Open
Bug 378745
Opened 17 years ago
Updated 11 months ago
Enabling designMode makes images surrounded by text appear selected
Categories
(Core :: DOM: Editor, defect)
Tracking
()
NEW
People
(Reporter: mfenniak-moz, Unassigned)
References
Details
Attachments
(2 files)
476 bytes,
text/html
|
Details | |
2.13 KB,
patch
|
brettw
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20061201 Firefox/2.0.0.3 (Ubuntu-feisty) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20061201 Firefox/2.0.0.3 (Ubuntu-feisty) When designMode is enabled on an HTML document, some images appear selected automatically. On Windows, they turn slightly blue. The images are not actually selected, but just appear that way. It only occurs on images that are surrounded by non-whitespace on both sides. A test case will be attached. Reproducible: Always Steps to Reproduce: 1. Open test case (to be attached). Actual Results: The first two images on the page appear selected -- they have text surrounding the images. The second two images on the page are not selected -- the first has a space before the image, and the second has a space after the image. Expected Results: No images should appear selected in the test case.
Reporter | ||
Comment 1•17 years ago
|
||
Reporter | ||
Comment 2•17 years ago
|
||
Tracked this bug down to the inline spell checker. In the test case, the spell checker would combine the text from both sides of the image ("abc" and "def"), decide that the word "abcdef" is spelled incorrectly, and add the entire range (including the image) to the shell check selection (line 1355 of mozInlineSpellChecker.cpp). This also explains why the bug does not appear when whitespace is on either side of the image, since the spell checker will not treat the text as a single incorrectly spelled word. The proposed patch fixes this problem by making an image element, even an inline image, a "break element". After this patch, the spell checker works on "abc" and "def", but not the combined text.
Reporter | ||
Updated•17 years ago
|
Component: Editor → Spelling checker
Comment 3•17 years ago
|
||
Comment on attachment 262775 [details] [diff] [review] proposed patch Looks good.
Attachment #262775 -
Flags: review+
Updated•17 years ago
|
Assignee: nobody → aoakof
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•17 years ago
|
||
Shouldn't this check for more elements? Applet and object come to mind.
Updated•15 years ago
|
QA Contact: editor → spelling-checker
Comment 5•2 years ago
|
||
Hi Olli, this merits probably a re-triage.
Assignee: mfenniak-moz → nobody
Flags: needinfo?(bugs)
Updated•2 years ago
|
Severity: normal → S3
Updated•11 months ago
|
Component: Spelling checker → DOM: Editor
Flags: needinfo?(smaug)
You need to log in
before you can comment on or make changes to this bug.
Description
•