Closed
Bug 668599
Opened 13 years ago
Closed 13 years ago
Cannot enter new input in contenteditable area if there’s a text selection inside of it
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: mathias, Assigned: kaze)
Details
Attachments
(2 files)
545 bytes,
text/plain
|
Details | |
5.38 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Test case: data:text/html;charset=utf-8,%3C!DOCTYPE%20html%3E%3Ctitle%3ETest%3C%2Ftitle%3E%3Cp%3EThis%20is%20just%20%3Cb%20contenteditable%3Esome%20editable%20text%3C%2Fb%3E%3Cscript%3Edocument.querySelector('b').focus()%3C%2Fscript%3E Open that page, select some text inside the bold contenteditable area, and start typing. Nothing happens. The expected behavior is of course that the selected text would be replaced by the new input.
Reporter | ||
Comment 2•13 years ago
|
||
(In reply to comment #1) > Can you provide a url? > I see a strange error in description. That was the URL. I ran it through my URL shortener for your convenience: http://mths.be/bbg
WFM on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0a1) Gecko/20110630 Firefox/7.0a1 If I select only the text (blue color) works fine, but if i select also the margins of the text field, it doesn't work(still blue color). If I select the hole text field, also with the margins (grey color), doesn't work but i dont't think it should.
Comment 4•13 years ago
|
||
Additional test case attached. Uses javascript to make a selection. This only seems to occur if element is focused after the selection is made.
Updated•13 years ago
|
Component: General → Editor
Product: Firefox → Core
QA Contact: general → editor
Assignee | ||
Comment 6•13 years ago
|
||
Looking into it. Note that this bug doesn't occur on block-level elements: replace the <span> with a <p> and everything works as expected. (In reply to comment #4) > This only seems to occur if element is focused after the selection is made. Confirmed here.
Assignee | ||
Comment 7•13 years ago
|
||
Attachment #547841 -
Flags: review?(ehsan)
Comment 8•13 years ago
|
||
Comment on attachment 547841 [details] [diff] [review] patch proposal r=me. Can you please also file a followup bug for the issue with pressing Enter in the contenteditable span? We need both these bugs fixed in Firefox 8.
Attachment #547841 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 9•13 years ago
|
||
Sure! I have proposed a patch for that in bug 460740.
Comment 10•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/167f6642efd4 Note that the changeset has been pushed with the wrong commit message, it points to a not-yet existing bug, plus this bug is unconfirmed but has a patch that has also been pushed? Ok, enough for today :) please pay attention in future.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Assignee | ||
Comment 11•13 years ago
|
||
Sorry for the wrong bug number, I’ll be extra careful for the next ones.
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Target Milestone: mozilla8 → ---
Updated•13 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Target Milestone: --- → mozilla8
You need to log in
before you can comment on or make changes to this bug.
Description
•