You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2026-01-03 21:42:32 +03:00
fix resize to only work with left mouse click (#10546)
Co-authored-by: Neeraj <neerajv@thirdrocktechkno.com> Co-authored-by: Kerry <kerrya@element.io>
This commit is contained in:
@@ -114,6 +114,10 @@ export default class Resizer<C extends IConfig = IConfig> {
|
||||
}
|
||||
|
||||
private onMouseDown = (event: MouseEvent): void => {
|
||||
const LEFT_MOUSE_BUTTON = 0;
|
||||
if (event.button !== LEFT_MOUSE_BUTTON) {
|
||||
return;
|
||||
}
|
||||
// use closest in case the resize handle contains
|
||||
// child dom nodes that can be the target
|
||||
const resizeHandle = event.target && (<HTMLDivElement>event.target).closest(`.${this.classNames.handle}`);
|
||||
|
||||
Reference in New Issue
Block a user