Closed Bug 1102906 Opened 10 years ago Closed 9 years ago

Contenteditable: Drag and drop locks caret (also affected CKEditor and TinyMCE as well as Thunderbird)

Categories

(Core :: DOM: Editor, defect)

32 Branch
x86_64
All
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla36
Tracking Status
firefox33 --- wontfix
firefox34 + wontfix
firefox35 + wontfix
firefox36 + fixed
firefox-esr31 --- unaffected

People

(Reporter: p.jasiun, Assigned: TYLin)

References

()

Details

(Keywords: dev-doc-needed, regression, site-compat)

Attachments

(1 file, 2 obsolete files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.65 Safari/537.36

Steps to reproduce:

1. Create a contenteditable element with an image:
	<div contenteditable="true">
		Foo<img src="https://mozorg.cdn.mozilla.net/media/img/home/voices/firefox-logo-wordmark-white.png">bar
	</div>
2. Drag and drop the image


Actual results:

Cannot move cursor using keyboard. Even if I move cursor to the other place with a mouse I am still not able to move it with keyboard arrows.

Does not work on Firefox 33.1.1. On Firefox 30 everything is fine.

Tested on Windows 7, Ubuntu 12.04 and OS X 10.10.1.


Expected results:

Should work as expected, as in Firefox 30.
Summary: Contenteditable: Drag and drop lock cursor → Contenteditable: Drag and drop lock caret
Summary: Contenteditable: Drag and drop lock caret → Contenteditable: Drag and drop locks caret
This bug affects CKEditor - http://dev.ckeditor.com/ticket/12697
Status: UNCONFIRMED → NEW
Component: Untriaged → Editor
Ever confirmed: true
OS: Linux → All
Product: Firefox → Core
Version: 33 Branch → 32 Branch
[Tracking Requested - why for this release]:

[Tracking Requested - why for this release]:

[Tracking Requested - why for this release]:

Regression window(m-i)
Good:
https://hg.mozilla.org/integration/mozilla-inbound/rev/04dd691d5f59
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0 ID:20140602230732
Bad:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1d2b67fc93f7
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0 ID:20140603000934
Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=04dd691d5f59&tochange=1d2b67fc93f7

Regressed by: Bug 924692
Blocks: 924692
Flags: needinfo?(tlin)
Keywords: regression
In local build
Last Good: a1582fd3bf01
First Bad: 1d2b67fc93f7
Regressed by 1d2b67fc93f7	Phoebe Chang — Bug 924692 - Part 4: Hooks up event handling to TouchCaret; r=roc, bugs
Severity: normal → major
Summary: Contenteditable: Drag and drop locks caret → Contenteditable: Drag and drop locks caret (also affected CKEditor and TinyMCE as well as Thunderbird)
Flags: needinfo?(roc)
Flags: needinfo?(bugs)
I can reproduce this issue on Nightly on non-e10s tab due to drag & drop does not yet support in bug 936092. The causes of this might be related to line 879 ~ 882 added in bug 924692 part 4 [1].

[1] http://hg.mozilla.org/mozilla-central/annotate/c9cfa9b91dea/editor/libeditor/nsEditorEventListener.cpp#l879
Assignee: nobody → tlin
Status: NEW → ASSIGNED
Flags: needinfo?(tlin)
The deleted lines were added in bug 924692 part 4. It will incorrectly
disable the caret in PresShell so that the caret cannot be moved by
using keyboard in nsSelectMoveScrollCommand::DoCommand().
Attachment #8527275 - Flags: review?(roc)
Comment on attachment 8527275 [details] [diff] [review]
Fix immovable caret after drag-and-drop. (v1)

Review of attachment 8527275 [details] [diff] [review]:
-----------------------------------------------------------------

Please add a test!
Attachment #8527275 - Flags: review?(roc) → review+
Flags: needinfo?(bugs)
Sadly, as we're building 34 RC today, I think it's too late to take this fix. We will ship the issue in 34 but I would like to see this fixed in 35. I am also tracking for 34 as a potential ride-along in a point release.
My test runs in M-oth on try.
Comment on attachment 8528886 [details] [diff] [review]
Fix immovable caret after drag-and-drop. r=roc (v2)

Review of attachment 8528886 [details] [diff] [review]:
-----------------------------------------------------------------

::: editor/libeditor/tests/test_bug1102906.html
@@ +43,5 @@
> +    }
> +    sendChar("!");
> +
> +    is(content.textContent, "!" + textContentAfterDrop,
> +       "The exclaimation mark should be inserted at the front.");

exclamation
Attachment #8528886 - Flags: review?(roc) → review+
Fix typo.
Attachment #8527275 - Attachment is obsolete: true
Attachment #8528886 - Attachment is obsolete: true
Attachment #8529476 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/e70f4f5c543f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Can we get an uplift nomination here for Beta?  If it's low risk to take, we can put it in Monday Dec 22 Beta build, otherwise wontfix and it can go out with FF 36.
Keywords: site-compat
I think the risk is low. The regression was introduced in bug 924692 which added touch caret feature on B2G. By removing the hunk, the behavior of drag and drop restored to it was before bug 924692 is landed.
Flags: needinfo?(roc)
We're too late for 35 with the last beta out the door. This will have to ride to release from 36.
Removing dev-doc-needed: we usually don't document regression. Re-add with a kind explanation if you disagree :-)
Keywords: dev-doc-needed
I mention major regressions on the site compatibility documents. Since this has affected popular rich text editors, I'll mention this later today.
Keywords: dev-doc-needed
Oh cool! Thanks!
QA Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.