chore: dont add toolbar position update listeners on mobile as its unnecessary [skip e2e]

This commit is contained in:
Aman Harwara
2023-10-27 20:03:43 +05:30
parent 0b9116934b
commit 64d3b01b6b

View File

@@ -366,6 +366,10 @@ const ToolbarPlugin = () => {
}, [])
useEffect(() => {
if (isMobile) {
return
}
const scrollerElem = activeEditor.getRootElement()
const update = () => {
@@ -386,7 +390,7 @@ const ToolbarPlugin = () => {
scrollerElem.removeEventListener('scroll', debouncedUpdate)
}
}
}, [activeEditor, updateToolbarFloatingPosition])
}, [activeEditor, isMobile, updateToolbarFloatingPosition])
useEffect(() => {
return mergeRegister(