New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 707086 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Javascript undo does not seem to work reliablly

Project Member Reported by sgu...@chromium.org, Mar 31 2017

Issue description

1. Open gmail compose 
2. connect using chrome://inspect
3. type "Test"
4. do a document.execcommand("undo")
5. It seems to delete one character at a time for the first 2 undo's and then it deletes "Te" at once.


 

Comment 1 by sgu...@chromium.org, Mar 31 2017

changwan, any ideas?
Status: Assigned (was: Untriaged)
If the text is being composed, the result of undo will effectively remove the text. But keyboard app does not seem to accept the text change from editor. Probably we should restart input method when there is a change to the composition text, as suggested in issue 681519.
Cc: aelias@chromium.org
Status: WontFix (was: Assigned)
Oops, I misread the steps.

Actually, this works as expected. I suspect that the reason is that the changes came from the keyboard as
Te -> Tes -> Test in the first place. Keyboard apps are usually multi threaded to be responsive to the user input while it can talk to editor apps asynchronously.
So if you type 'Test' quickly enough, keyboard app may send 'Te' at once.

One small noticeable issue here is that sometimes the restructured characters get highlighted, which seems to be a side effect of the current implementation which happens to change selection before making the composition change.

Comment 4 by sgu...@chromium.org, May 10 2017

even if it is coming from keyboard, undo would still be broken for a user.

But if it is because of the keyboard, then native views should have the same problem, I think.

Sign in to add a comment