Skip to content

Commit

Permalink
fix(BoxResizer): test case throws an exception on Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
luolonghao committed Aug 19, 2024
1 parent d463b00 commit 44980ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ui/box-resizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export class BoxResizer {
const pointerNativeNode = pointerNode.get(0) as Element;
// The capture will be implicitly released after a pointerup or pointercancel event.
// https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture
pointerNativeNode.setPointerCapture(pointerEvent.pointerId);
try {
// Test case throws an exception on Firefox.
pointerNativeNode.setPointerCapture(pointerEvent.pointerId);
} catch(e) { /* empty */ }
clientX = pointerEvent.clientX;
width = boxContainer.width();
infoNode.show();
Expand Down

0 comments on commit 44980ce

Please sign in to comment.