New issue
Advanced search Search tips

Issue 717610 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

strange behaviour in DOM

Reported by cristian...@gmail.com, May 2 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Steps to reproduce the problem:
i built a div contenteditable where onkeypressed dom inside is changed. onevent preventdefault for default behaviour.
2 Normally it works correctly but it i add elements very fast 
instead to add the dom defined it add the dafault character.  
Js might be executed synch so i dont understand. 

What is the expected behavior?
default char is not inserted , but custom node. 

What went wrong?
default behaviour is not blocked

Did this work before? N/A 

Chrome version: 55.0.2883.87  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 25.0 r0
 
the problem seams related with focus.... 

but also executing blur hen i press the char is inserted
i found a solution : window.getSelection().removeAllRanges();
on blur window.getSelection().removeAllRanges(); might be executed automatically ? 
Components: -Blink Blink>Editing
Labels: Needs-Feedback
Are you able to provide a reproduction URI? (A jsbin or jsfiddle?)

Comment 5 by yosin@chromium.org, May 9 2017

Status: WontFix (was: Unconfirmed)
Mark "WontFix" since this is expected behavior.

Typed character is inserted before *focused* selection or replaced *focused* selection.

When changing DOM tree around selection in "keydown" event handler, selection
can be cleared or loose focus on selection.

Sign in to add a comment