Fix force-click during drag sometimes causing collections to switch
Closes #2652
This commit is contained in:
parent
48ad6dcb99
commit
1937220099
1 changed files with 6 additions and 1 deletions
|
@ -664,7 +664,12 @@ class VirtualizedTable extends React.Component {
|
|||
this._isMouseDrag = true;
|
||||
}
|
||||
|
||||
_onDragEnd = () => {
|
||||
_onDragEnd = async () => {
|
||||
// macOS force-click sometimes causes a second mouseup event to be fired some time later
|
||||
// causing a collection change on dragend, so we add a delay here. It shouldn't cause any issues
|
||||
// because isMouseDrag is only used in mouseup handler to exactly prevent from accidentally switching
|
||||
// selection after dragend.
|
||||
await Zotero.Promise.delay(500);
|
||||
this._isMouseDrag = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue