chore: dont show ios keyboard button when editing link in super
This commit is contained in:
@@ -7,7 +7,7 @@ const IosKeyboardClose = () => {
|
|||||||
const application = useApplication()
|
const application = useApplication()
|
||||||
const [isVisible, setIsVisible] = useState(false)
|
const [isVisible, setIsVisible] = useState(false)
|
||||||
const [isFocusInSuperEditor, setIsFocusInSuperEditor] = useState(
|
const [isFocusInSuperEditor, setIsFocusInSuperEditor] = useState(
|
||||||
() => !!document.activeElement?.closest('#blocks-editor'),
|
() => !!document.activeElement?.closest('#blocks-editor,#super-mobile-toolbar'),
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -22,7 +22,7 @@ const IosKeyboardClose = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleFocusChange = () => {
|
const handleFocusChange = () => {
|
||||||
setIsFocusInSuperEditor(!!document.activeElement?.closest('#blocks-editor'))
|
setIsFocusInSuperEditor(!!document.activeElement?.closest('#blocks-editor,#super-mobile-toolbar'))
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('focusin', handleFocusChange)
|
document.addEventListener('focusin', handleFocusChange)
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ const MobileToolbarPlugin = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{modal}
|
{modal}
|
||||||
<div className="bg-contrast">
|
<div className="bg-contrast" id="super-mobile-toolbar">
|
||||||
{isSelectionLink && (
|
{isSelectionLink && (
|
||||||
<div className="border-t border-border px-2" ref={linkEditorRef}>
|
<div className="border-t border-border px-2" ref={linkEditorRef}>
|
||||||
<LinkEditor
|
<LinkEditor
|
||||||
|
|||||||
Reference in New Issue
Block a user