Open Bug 1006793 Opened 12 years ago Updated 5 years ago

execCommand indent fails to indent text in some situations

Categories

(Core :: DOM: Editor, defect, P5)

9 Branch
defect

Tracking

()

People

(Reporter: sam.hemelryk, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release) Build ID: 20140428193813 Steps to reproduce: Browse to http://jsfiddle.net/GFv77/4/ and follow the instructions using Firefox 26 or Firefox 29. If the following link is not active the following steps can be used to reproduce this: 1. Create a contenteditable area and set its content to the following: <p>Oh to talking improve produce in limited offices fifteen an. Wicket branch to answer do we. Place are decay men hours tiled. If or of ye throwing friendly required. Marianne interest in exertion as. Offering my branched confined oh dashwood. <br /><br />There worse by an of miles civil. Manner before lively wholly am mr indeed expect. <br /></p><div class="editor-indent" style="margin-left: 30px;"><p>Among every merry his yet has her. You mistress get dashwood children off. Met whose marry under the merit. In it do continual consulted no listening. Devonshire sir sex motionless travelling six themselves. <br /></p></div> 2. Select the text in the first paragraph between the <br> tags "There worse by an of miles civil. Manner before lively wholly am mr indeed expect." 3. Trigger execCommand('indent') Actual results: You will notice that despite triggering execCommand('indent') nothing has actually happened. Expected results: We expected to see the selected line of text get indented.
This issue was encountered by a colleague of mine while testing https://bugzilla.mozilla.org/show_bug.cgi?id=1005776 We've since reproduced it in Firefox 26 and Firefox 29 using the noted JSFiddle link. There is an issue in the Moodle tracker at https://tracker.moodle.org/browse/MDL-45422 presently we consider this a minor bug however we will be watching that issue and should our users encounter this on production sites we'll look for a workaround in JS. If someone gets a moment to fix this in Firefox even better!
OS: Linux → All
Hardware: x86_64 → All
I've just run through the same testing I did on 1005776 testing a set of other commands. The results are: backcolor : OK bold : OK createlink : OK decreasefontsize : OK fontsize : OK fontcolor : OK formatblock (blockquote) : OK formatblock (div) : OK heading (h1) : OK indent : Fail - nothing happens. italic : OK strikethrough : OK subscript : OK underline : OK So just indent is affected for this issue. I did observer during testing that if I first execute a command that results in a block element being used (heading, formatblock etc) and then execute indent that indent then works as expected. The bug seems to occur only when the selected text is preceeded by a BR and followed by a BR. I've not completed a full test of this however so cannot be sure.
-g 2011-08-24-03-08-13-mozilla-central-firefox-9.0a1.en-US.linux-x86_64 198c7de0699d -b 2011-08-25-03-08-23-mozilla-central-firefox-9.0a1.en-US.linux-x86_64 e58e98a89827 https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=198c7de0699d&tochange=e58e98a89827
Blocks: 677752
Status: UNCONFIRMED → NEW
QA Whiteboard: [bugday-20140519]
Component: Untriaged → Editor
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
Version: 29 Branch → 9 Branch
It would be nice if we could get a narrower regression range...
(In reply to :Ehsan Akhgari (not reading bugmail, needinfo? me!) from comment #4) > It would be nice if we could get a narrower regression range... There are no inbound builds to go further, but as Aleksej pointed, it was bug 677752 that caused this. Adding Fabien to cc.

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.