mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 14:01:12 +00:00
Ensure that the visual editor recognises a "drop" event as a "mouseup" (#19560)
GitOrigin-RevId: 967d3c80a1501ffdfe9a7e3e978cba746a54d7b3
This commit is contained in:
parent
21e458df2a
commit
4af10054df
1 changed files with 8 additions and 0 deletions
|
@ -107,6 +107,14 @@ const mouseDownListener = EditorView.domEventHandlers({
|
|||
})
|
||||
})
|
||||
},
|
||||
drop: (event: MouseEvent, view) => {
|
||||
// treat a `drop` event as a `mouseup` event, which isn't fired
|
||||
window.setTimeout(() => {
|
||||
view.dispatch({
|
||||
effects: mouseDownEffect.of(false),
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
const mousedownSelectionState = StateField.define<EditorSelection | undefined>({
|
||||
|
|
Loading…
Reference in a new issue