Open Bug 1350898 Opened 9 years ago Updated 3 years ago

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

Categories

(Firefox :: Menus, defect)

defect

Tracking

()

People

(Reporter: standard8, Unassigned)

References

Details

+++ 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 (this.target.nodeType == Node.TEXT_NODE) { > > + // For text nodes, look at the parent node to determine the spellcheck attribute. > > + this.canSpellCheck = this.target.parentNode && > > + this._isSpellCheckEnabled(this.target); > > 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 this.target.parentNode 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
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.