chore: dont add toolbar position update listeners on mobile as its unnecessary [skip e2e]
This commit is contained in:
@@ -366,6 +366,10 @@ const ToolbarPlugin = () => {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (isMobile) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const scrollerElem = activeEditor.getRootElement()
|
const scrollerElem = activeEditor.getRootElement()
|
||||||
|
|
||||||
const update = () => {
|
const update = () => {
|
||||||
@@ -386,7 +390,7 @@ const ToolbarPlugin = () => {
|
|||||||
scrollerElem.removeEventListener('scroll', debouncedUpdate)
|
scrollerElem.removeEventListener('scroll', debouncedUpdate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [activeEditor, updateToolbarFloatingPosition])
|
}, [activeEditor, isMobile, updateToolbarFloatingPosition])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return mergeRegister(
|
return mergeRegister(
|
||||||
|
|||||||
Reference in New Issue
Block a user