Open Bug 1240536 Opened 6 years ago Updated 3 years ago

switching dictionary with JS doesn't cause refresh of underlines

Categories

(Core :: XPCOM, defect)

43 Branch
defect
Not set
normal

Tracking

()

UNCONFIRMED

People

(Reporter: naber, Unassigned)

Details

Attachments

(1 file)

Attached file test-ff.html
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20160106234723

Steps to reproduce:

My add-on (https://addons.mozilla.org/en-US/firefox/addon/automatic-dictionary-switcher/) calls this JS which works in FF43 (actually with a setTimout wrapper) but doesn't work in FF44.0b9 anymore:

spellchecker.dictionary = dictionary;

where `spellchecker` is: const  spellchecker = classes["@mozilla.org/spellchecker/engine;1"].getService(interfaces.mozISpellCheckingEngine),

With FF44 I can see in the context menu that the correct language has been selected by my add-on, but still all correct words in that language are underlined in red. If I edit a word and remove the cursor from it, the underline is removed. If I add an incorrect word, it is underlined as expected. So it seems `spellchecker.dictionary = ...;` called from an add-on works but lacks a refresh. Indeed, manually switching the language makes all the unexpected underlines go away. (I've tested this with English and German, in my case English works but German got the wrong underlines.)


Actual results:

Correct German words get underlined as if they are misspelled when they aren't.


Expected results:

Switching the dictionary via JS should make sure the underlines get refreshed.
Component: Untriaged → XPCOM
Product: Firefox → Core
I was going to write an addon exactly like Daniel's until I saw his, and this.

It's been 7 months guys, c'mon.
Has someone any updates? Thanks

Any update?

any update

You need to log in before you can comment on or make changes to this bug.