Open Bug 1350898 Opened 3 years ago Updated 3 years ago

The check for enabling spelling on a TEXT_NODE appears to be incorrect.


(Firefox :: Menus, defect)

Not set




(Reporter: standard8, Unassigned)



+++ This bug was initially created as a clone of Bug #1350298 +++

> Comment on attachment 8850921 [details]
> Bug 1350298 - Reduce the complexity of nsContextMenu:setTarget.
> ::: browser/base/content/nsContextMenu.js:696
> (Diff revision 1)
> > +    if ( == Node.TEXT_NODE) {
> > +      // For text nodes, look at the parent node to determine the spellcheck attribute.
> > +      this.canSpellCheck = &&
> > +                           this._isSpellCheckEnabled(;
> I realize you didn't write this code but moved it, however this looks like a
> bug to me. The comment here doesn't match what is actually being done.
> Shouldn't we be passing to _isSpellCheckEnabled?

I've taken a look at this, and it does appear that we should be passing parentNode.

However, I couldn't work out how to reproduce this/possible effects - every element I tried the context menu on seemed to be an ELEMENT_NODE.
Oh, from what I could work out, this code was added in bug 905176.
Blocks: 905176
You need to log in before you can comment on or make changes to this bug.