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

RESOLVED FIXED in Firefox 52

Status

()

RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: cyril.auburtin, Assigned: Ehsan)

Tracking

({testcase})

43 Branch
mozilla52
testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
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
(Reporter)

Comment 1

3 years ago
*no selection event I mean

Updated

3 years ago
Component: Untriaged → Untriaged
Product: Firefox → Core

Updated

3 years ago
Component: Untriaged → Editor

Comment 2

3 years ago
Created attachment 8719205 [details]
1248148.html

Comment 3

3 years ago
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

Updated

3 years ago
See Also: → bug 1242718

Comment 4

3 years ago
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)
(Assignee)

Updated

2 years ago
Blocks: 1309612
(Assignee)

Comment 5

2 years ago
Created attachment 8800672 [details] [diff] [review]
Disable firing selection events during HTML editor initialization

This is similar to what we do for the plaintext editor initialization.
Attachment #8800672 - Flags: review?(michael)

Comment 6

2 years ago
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+

Comment 7

2 years ago
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/67300cfca733
Disable firing selection events during HTML editor initialization; r=mystor

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/67300cfca733
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.