chore: dont show ios keyboard button when editing link in super

This commit is contained in:
Aman Harwara
2023-07-24 16:04:37 +05:30
parent 0af41cbcad
commit a91ab4abbf
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ const IosKeyboardClose = () => {
const application = useApplication()
const [isVisible, setIsVisible] = useState(false)
const [isFocusInSuperEditor, setIsFocusInSuperEditor] = useState(
() => !!document.activeElement?.closest('#blocks-editor'),
() => !!document.activeElement?.closest('#blocks-editor,#super-mobile-toolbar'),
)
useEffect(() => {
@@ -22,7 +22,7 @@ const IosKeyboardClose = () => {
useEffect(() => {
const handleFocusChange = () => {
setIsFocusInSuperEditor(!!document.activeElement?.closest('#blocks-editor'))
setIsFocusInSuperEditor(!!document.activeElement?.closest('#blocks-editor,#super-mobile-toolbar'))
}
document.addEventListener('focusin', handleFocusChange)

View File

@@ -357,7 +357,7 @@ const MobileToolbarPlugin = () => {
return (
<>
{modal}
<div className="bg-contrast">
<div className="bg-contrast" id="super-mobile-toolbar">
{isSelectionLink && (
<div className="border-t border-border px-2" ref={linkEditorRef}>
<LinkEditor