Open bjones1 opened 5 months ago
Follow-up debug: v. 6.0.0 of the Codemirror view works, while v6.0.1 doesn't. Investigation shows that this commit causes the failure. Backing out this changes fixes the behavior. In the current Codemirror view we have:
let selectionNotFocus = !focused &&
hasSelection(this.dom, this.view.observer.selectionRange) && !(activeElt && this.dom.contains(activeElt));
Adding the following line fixes the bug:
selectionNotFocus = this.view.state.facet(editable) ? focused : hasSelection(this.dom, this.view.observer.selectionRange)
I don't yet understand why, or how to investigate further.
The procedure to make this edit:
client/
directory, run npm update
.client/node_modules/@codemirror/view/dist/index.js
per the directions above. Important: do not edit index.cjs
(which isn't used in the build).npm run build
.
If a selection is made in the TinyMCE editor inside Codemirror, then the user clicks on either the Format menu or the formatting drop-down, then the TinyMCE menu bar and the selection disappear.