editor.js
editor.js copied to clipboard
Default link tool not working in Safari
The default link tool is not working in Safari, even in your demo. Clicking the link icon does not trigger anything.
When editing an existing link (set prior to the OS update), the link field shows and I can edit it.
Device, Browser, OS: macOS Sonoma (14.0), Safari 17.0
Editor.js version: Latest available
Can't reproduce right away. But haven't tested in Sonoma yet. Will check.
Looks like this happens in latest version of MacOS Sonoma (14) and Safari.
The issue is related the anchorElement. It seems when user focus on input, Safari removes the selection so anchorElement becomes null but Chrome stores input focus as a selection.
Due to focusedElement(anchorElement) does not exist on Safari, inline toolbar closes
if (!focusedElement) {
/**
* If there is no selected range, close inline toolbar
*
* @todo Make this method more straightforward
*/
if (!Selection.range) {
this.Editor.InlineToolbar.close();
}
return;
}
I confirm this bug on Safari 17 MacOS Sonoma. You can also reproduce this issue on your website demo.
It worked again for me on Version 17.1 (19616.2.9.11.7).
I confirm this bug again with Editor.js 2.30.2 on MacOS Sonoma 14.5, Safari 17.5. You can also reproduce this issue again on your website demo.
Previous latest minor version of Editor.js (2.29.1) works fine.