Bug 1586743 Comment 8 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Alessandro Castellani (:aleca) from comment #7)
> Maybe Tim can help us out here.
> Sorry to bother you, but I can't figure out why the `spellcheck` attribute is not recognized and not adding the "Check Spelling" and "Languages" items in the context menu.

There are 2 different types of context menus for html <input>:
* The ones used by pages loaded in the content area (eg. about:config, about:preferences), those are implemented and provided by nsContextMenu.js
* The ones used by "top-level" windows (eg. messenger.xul) which editMenuOverlay.js provides

The spellcheck context menu Jorg mentions in comment 6 falls into the first category. Since editMenuOverlay.js doesn't implement the spellcheck menu, I assume that's why this has regressed here.

The easiest way to fix this would be to wrap the input inside a `<moz-input-box spellcheck="true">` element (which is how the <textbox> binding implements spellcheck), we do plan to remove this however once the Firefox urlbar stops using <moz-input-box> (bug 1586591), although this is a custom element you could relatively easily port over comm-central.

The other possible way would be forking editMenuOverlay.js to comm-central to add support for the spellcheck attribute.
(In reply to Alessandro Castellani (:aleca) from comment #7)
> Maybe Tim can help us out here.
> Sorry to bother you, but I can't figure out why the `spellcheck` attribute is not recognized and not adding the "Check Spelling" and "Languages" items in the context menu.

There are 2 different types of context menus for html <input>:
* The ones used by pages loaded in the content area (eg. about:config, about:preferences), those are implemented and provided by nsContextMenu.js
* The ones used by "top-level" windows (eg. messenger.xul) which editMenuOverlay.js provides

The spellcheck context menu Jorg mentions in comment 6 falls into the first category. Since editMenuOverlay.js doesn't implement the spellcheck menu, I assume that's why this has regressed here.

The easiest way to fix this would be to wrap the input inside a `<moz-input-box spellcheck="true">` element (which is how the <textbox> binding implements spellcheck), we do plan to remove this however once the Firefox urlbar stops using <moz-input-box> (bug 1586591), although this is a custom element you could relatively easily port over to comm-central.

The other possible way would be forking editMenuOverlay.js to comm-central to add support for the spellcheck attribute.

Back to Bug 1586743 Comment 8