Skip to content

Commit

Permalink
fix: style
Browse files Browse the repository at this point in the history
  • Loading branch information
electroluxcode committed Dec 7, 2024
1 parent 390ec02 commit b653fba
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/slate-react/src/components/editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -859,14 +859,11 @@ export const Editable = forwardRef(
// a leaky polyfill that only fires on keypresses or clicks. Instead, we
// want to fire for any change to the selection inside the editor.
// (2019/11/04) https://github.com/facebook/react/issues/5785
window.document.addEventListener(
'selectionchange',
()=>{
if(mouseDown.current){
scheduleOnDOMSelectionChange()
}
window.document.addEventListener('selectionchange', () => {
if (mouseDown.current) {
scheduleOnDOMSelectionChange()
}
)
})

// Listen for dragend and drop globally. In Firefox, if a drop handler
// initiates an operation that causes the originally dragged element to
Expand Down

0 comments on commit b653fba

Please sign in to comment.