Closed Bug 1248148 Opened 8 years ago Closed 8 years ago

Setting an element to contentEditable=true triggers a selectionchange (it shouldn't)

Categories

(Core :: DOM: Selection, defect)

43 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: cyril.auburtin, Assigned: ehsan.akhgari)

References

Details

(Keywords: testcase)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160212030242

Steps to reproduce:

demo: http://jsfiddle.net/crl/agv7ch2n/



Actual results:

event fired after setting contentEditable to true

if the property is already true no event is fired


Expected results:

no events should be fired when changing that property
*no selection event I mean
Product: Firefox → Core
Component: Untriaged → Editor
Attached file 1248148.html
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=cd8b8017370cf14c472c107d256bb98ce7a19270&tochange=8853d35b1154f25259240308b83ae8d05359ab98

Michael Layzell — Bug 1196479 - Fire selectstart and selectionchange events on the input node when the selection in that editor changes. r=ehsan

Michael, your opinion? Is it expected?
Blocks: 1196479
Component: Editor → Selection
Flags: needinfo?(michael)
Keywords: testcase
Version: 47 Branch → 43 Branch
See Also: → 1242718
I don't think that this is expected, but I don't have the time to figure out why it happens right now.
Flags: needinfo?(michael)
Blocks: 1309612
This is similar to what we do for the plaintext editor initialization.
Attachment #8800672 - Flags: review?(michael)
Comment on attachment 8800672 [details] [diff] [review]
Disable firing selection events during HTML editor initialization

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

lgtm
Attachment #8800672 - Flags: review?(michael) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/67300cfca733
Disable firing selection events during HTML editor initialization; r=mystor
https://hg.mozilla.org/mozilla-central/rev/67300cfca733
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: