Closed
Bug 747667
(Pepi3008)
Opened 12 years ago
Closed 12 years ago
contentEditable -> document.execCommand
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 745528
People
(Reporter: pepi3008, Unassigned)
References
()
Details
Attachments
(2 files)
When having a div with contentEditable="true" attribute, then entering only a short text and using the following js sequence on the whole selection: document.execCommand('bold', null, false); document.execCommand('italic', null, false); document.execCommand('underline', null, false); document.execCommand('strikethrough', null, false); then the selected text range won't be formatted, but the parent div gets the style attributes as shown in the video record. Thank You in Advance Pepi
Updated•12 years ago
|
Component: General → Editor
Product: Firefox → Core
QA Contact: general → editor
Comment 2•12 years ago
|
||
I believe this is fixed by one of Aryeh's latest patches...
Comment 3•12 years ago
|
||
Could you provide a self-contained test file -- HTML only, no PHP? I can't verify that your problem has gone away because I can't easily run your test file. This should be fixed by the patch to bug 745528, which will land as soon as mozilla-central reopens. Try waiting a few days, then download a Firefox nightly and test if the problem has gone away. (It won't be fixed in the stable version of Firefox until Firefox 15 is released, which should be in about 18 weeks.)
Updated•12 years ago
|
Attachment #617461 -
Attachment mime type: text/plain → text/html
Comment 6•12 years ago
|
||
What's the problem with how Firefox is processing your test file? Could you give exact steps of what you're doing with the test file, what Firefox does, and what you think it should be doing instead? Something like: 1) Type "abc" into the first text box. 2) Select the text that you just typed in. 3) Press the "B" button. Expected results: Text is bold. Actual results: Text is not bold. I can't confirm what the problem is unless you give detailed steps like that. Thanks!
Dear Aryeh, I get this bug when entering a short text in a div with contentEditable attribute. 1) If you type in for example: 'Just A Short Text' 2) Then select the typed in text and click in sequence 'B', 'I', 'U' and 'S'. Firefox will then generate a style attribute into the parent div: '<div style="font-weight: bold; font-style: italic; text-decoration: underline line-through;" id="divEdit"...' But it should generate a span tag for the selected text such as this: '<span style="font-weight: bold; font-style: italic; text-decoration: underline line-through;">...</span>'. Hope this helps. Best Wishes, Pepi
Comment 8•12 years ago
|
||
Thanks for the detailed instructions! Try the latest nightly of Firefox 15 from <http://nightly.mozilla.org/>. It works for me in 15.0a1 (2012-04-26). Please reopen this bug if it's still a problem for you. Firefox 15 is scheduled to be released to all Firefox users on August 28: <https://wiki.mozilla.org/RapidRelease/Calendar>.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•