Skip to content

Commit 0bcad3c

Browse files
committed
refactor: use currentTarget where sensible
1 parent 86928e5 commit 0bcad3c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/ItemDetailsDialog/ItemImageViewer/ImageControls.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default function ImageControls({
125125
className="ml-1"
126126
title="Upload image..."
127127
onClick={(e) => {
128-
const target = e.target as HTMLElement
128+
const target = e.currentTarget
129129
setImageUploadPopupPosition([
130130
target.offsetLeft + target.clientWidth / 2,
131131
target.offsetTop + target.clientHeight / 2,

src/components/OperationsMenu/OperationsMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function OperationsMenu({
4646
onClick={(e) => {
4747
e.preventDefault()
4848
setShowPopup(true)
49-
const target = e.target as HTMLElement
49+
const target = e.currentTarget
5050
setPopupPosition([
5151
target.offsetLeft + target.clientWidth / 2,
5252
target.offsetTop + target.clientHeight / 2,

0 commit comments

Comments
 (0)