UNPKG

rhino-editor

Version:

A custom element wrapped rich text editor

32 lines (30 loc) 658 B
import { Plugin } from "../chunks/chunk-XG3W5CFT.js"; import "../chunks/chunk-UM27USL5.js"; // src/exports/extensions/firefox-caret-plugin.ts function FirefoxCaretFixPlugin() { let focusing = false; return new Plugin({ props: { handleDOMEvents: { focus: (view) => { if (focusing) { focusing = false; } else { focusing = true; setTimeout(() => { view.dom.blur(); view.dom.focus(); }); } return false; } } } }); } export { FirefoxCaretFixPlugin }; //# sourceMappingURL=firefox-caret-plugin.js.map