-
-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable inline table editing and resizing controls in Firefox #432
Comments
The stupid thing (and I really wonder what the people who came up with A quick search doesn't however, find any saner alternatives. Do you happen to know of any? |
Unfortunately I did not find any alternatives and I agree that putting these lines in our library code is less than ideal. Maybe this is something we should put somewhere in the documentation? As soon as you know about this issue, it is rather easy to decide if one wants to use |
Noted in the docs in ProseMirror/prosemirror-schema-table@57c170f |
This is essentially the same commit as ProseMirror/prosemirror-schema-table@57c170f by @marijnh The rationale behind this is discussed in ProseMirror/prosemirror#432 This closes ProseMirror#22
Firefox adds its own controls to tables that are content editable, but they are useless with Prosemirror. Thus we are disabling them. Note that this is disabling them globally for the whole window. See ProseMirror/prosemirror#432 and ProseMirror/prosemirror-tables#22 WIKI-198. #53
Firefox provides additional UI controls to edit tables when they are contenteditable, which looks like this:
![table_controls_ff](https://cloud.githubusercontent.com/assets/152507/17691598/bed4c2e6-6395-11e6-87c7-a8fdab78ec43.png)
Using these controls does not play well with ProseMirror (e.g. inserting a row does not insert a row in the document model, resizing the table does not do anything).
It is possible to disable these controls with this code:
More information: https://developer.mozilla.org/en/docs/Web/API/Document/execCommand
I am currently calling these methods inside my code outside of ProseMirror. We could also think about directly putting these function calls in the ProseMirror code.
The text was updated successfully, but these errors were encountered: