New issue
Advanced search Search tips

Issue 630268 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Unable to simulate text input on Chrome dev browser

Project Member Reported by fameeda....@synerzip.com, Jul 21 2016

Issue description

Chrome Version : Version 53.0.2785.8 dev (64-bit)
Platform : Ubuntu 14.04 (64 bit)

URLs (if applicable) : https://jsfiddle.net/bL8L4v3h/

Other browsers tested:
  Chrome Stable: Version 51.0.2704.106 (64-bit) - OK
  Chrome on MAC: Version 53 dev - OK
  Chrome on Win: Version 53 dev - Fail


What steps will reproduce the problem?
- Open the URL given above. Run the JSFiddle.
- We are trying to simulate typing a character. For this, event 'TextEvent' is created and initialized with 'textInput' type.


What is the expected result?
Char 'X' is typed in the contentEditable div.

What happens instead?
Character is not entered. The div remains blank.

We intend to simulate keyboard events in our unit test cases. We fire the events in order keydown, keypress, textinput and keyup for entering the text. With the current stable and beta version of Chrome, the text is typed on all, Win, MAC and Linux.

 

Comment 1 by ajha@chromium.org, Jul 22 2016

Cc: ajha@chromium.org
Components: Blink>Input
Labels: -Pri-3 ReleaseBlock-Stable M-53 hasbisect OS-Mac Pri-1
Owner: dtapu...@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce this on the latest dev(53.0.27854.21) and the latest canary(54.0.2804.0/ 2803.0) on Linux Ubuntu 14.04, Mac OS 10.11.5 and Windows-7.

This is regressed in M-53.

Last good build: 53.0.2776.0
First bad build: 53.0.2777.0

Changelog: https://chromium.googlesource.com/chromium/src/+log/b6de7c9a7644fbcde203abda75c7a243dc4038da..b9820d493c42b7e3a4aebcd7956b016232600a1d

Suspected change: https://codereview.chromium.org/2070053004

dtapuska@: Could you please take a look at this.

Thank you! 
Status: WontFix (was: Assigned)
This is intended behavior and doesn't work in other vendor browsers as well.

But you are fortunate:
document.execCommand("insertText", false, value);

will actually work correctly in all other vendors and chrome too.
See the modified fiddle: https://jsfiddle.net/j92tuh0q/



Comment 3 by t.rebo...@gmail.com, Sep 23 2016

Is there any way to trigger a trusted TextEvent from a chrome extension ?
does execCommand not work for you?

also check out these apis 

https://developer.chrome.com/extensions/input_ime
https://developer.chrome.com/extensions/debugger

Comment 5 by t.rebo...@gmail.com, Sep 23 2016

execCommand surprisingly does work for me. Isn't it supposed to work only when the design mode is enabled, and never when this command is executed on inputs or textareas?

About the APIs you gave a link for, input_ime only works on chrome OS, and the debugger API would probably work but it's a hell of a workaround, and is deactivated when the developer tools are toggled on.
Labels: Hotlist-Input-Dev

Sign in to add a comment