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:
parent
144b2c7e15
commit
c8585be2f8
1 changed files with 4 additions and 0 deletions
|
@ -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}`);
|
||||
|
|
Loading…
Reference in a new issue