Commit c5d1f86
committed
fix(review): skip ToolbarHost mousemove when unfocused, drop type cast
Address PR review nits on #660:
- ToolbarHost's window mousemove listener now bails on `!isFocused`,
so dock-mounted-but-hidden panels don't track mouse for a toolbar
the user can't see. Matches the intent of the existing isFocused
prop already passed through to the hook for draft handling.
- Widen useAnnotationToolbar's handleMouseMove arg to a structural
`{clientX, clientY}` shape. The hook only reads those two fields,
so accepting the structural shape eliminates the
`as unknown as React.MouseEvent` cast in ToolbarHost while staying
compatible with React.MouseEvent callers.1 parent 8d6e71b commit c5d1f86
2 files changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments