Closed
Bug 494351
Opened 16 years ago
Closed 12 years ago
spellcheck=false not being respected in contentEditable elements
Categories
(Core :: Spelling checker, defect)
Core
Spelling checker
Tracking
()
RESOLVED
DUPLICATE
of bug 674927
People
(Reporter: mtsui, Assigned: peterv)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090521 Minefield/3.6a1pre
When I type incorrectly spelt words in elements with attribute contentEditable="" and spellcheck=false, the spellchecker still underlines my words with red lines and offers spell corrections.
I have this snippet of html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
</head>
<body>
<p contentEditable="">
spell checking should be enabled here
</p>
<p contentEditable="" spellcheck="false">
spell checking should be disabled here
</p>
<div contentEditable="" spellcheck="false">
spell checking should be disabled here
</div>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1. On the second line ("spell checking should be disabled here" type "notaword" followed by space.
Actual Results:
"notaword" is red underlined
Expected Results:
no spell checking should happen
The first <p> does not have spellcheck attribute set, and is used as a control.
Assignee | ||
Comment 2•16 years ago
|
||
The spellchecker doesn't know how to deal with parts of the tree under the editor root (document for contentEditable) having spellchecking disabled. We might be able to check for spellcheck attributes on the node or one of its ancestors in SkipSpellCheckForNode (http://hg.mozilla.org/mozilla-central/annotate/6a412ac513c4/extensions/spellcheck/src/mozInlineSpellChecker.cpp#l1148), though that gets called per word and so it might be a bit expensive. It also only gets called on the start node of the range for a word, so if a word crosses multiple nodes we'd need to do that check for every node in the range and presumably split words. Given that last part there might be a better place to check this, but I don't know the spellcheck code.
If this turns out to be a real performance issue we could record the spellcheck-status of a node in the flags.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Thanks Peter. I don't think we need to worry about words that are only partly spellcheckable. Do you want to roll a patch for this, or shall I?
Assignee | ||
Comment 4•16 years ago
|
||
I'll take this.
Status: NEW → ASSIGNED
Component: General → Spelling checker
OS: Mac OS X → All
Product: Firefox → Core
QA Contact: general → spelling-checker
Hardware: x86 → All
Version: unspecified → Trunk
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → peterv
Comment 5•15 years ago
|
||
Hi there, any update?
We'd actually be happy with a document-wide setting, but of course our use case doesn't represent all use cases.
In the meantime, would you know of any workarounds? (Short of drastic things like disabling the context menu).
Thanks!
Comment 6•13 years ago
|
||
Updated•13 years ago
|
Attachment #545113 -
Attachment mime type: application/octet-stream → application/xhtml+xml
Comment 7•12 years ago
|
||
Marking this as a duplicate of a newer bug, because there are mostly-working patches on the newer bug (I didn't know about this one).
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•