WebKit Bugzilla
Attachment 373662 Details for
Bug 199587
: Typing into a cell in a Google Sheet lags behind by one character
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Test
test.html (text/html), 949 bytes, created by
Daniel Bates
on 2019-07-08 14:13:21 PDT
(
hide
)
Description:
Test
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2019-07-08 14:13:21 PDT
Size:
949 bytes
patch
obsolete
><!DOCTYPE html> ><html> ><body> ><p>Focus the text field below. Then press a key on the keyboard. The output will be the value of the field seen one event loop turn after the listed event dispatched.</p> ><input id="input"> ><pre id="console"></pre> ><script> >// Note that scheduling a timer from an Input event handler is for aesthetics only: to make the >// logged Input event be ordered like the spec'ed DOM dispatch event order. By the time the Input >// event fires the DOM is guaranteed to have been updated. So, no timer is needed. >let input = document.getElementById("input"); >for (let eventName of ["keydown", "keypress", "keyup", "input"]) { > input.addEventListener(eventName, (event) => { > window.setTimeout(() => { > log(`${eventName}: ${input.value}`); > }, 0); > }); >} > >function log(message) >{ > document.getElementById("console").appendChild(document.createTextNode(message + "\n")); >} ></script> ></body> ></html>
<!DOCTYPE html> <html> <body> <p>Focus the text field below. Then press a key on the keyboard. The output will be the value of the field seen one event loop turn after the listed event dispatched.</p> <input id="input"> <pre id="console"></pre> <script> // Note that scheduling a timer from an Input event handler is for aesthetics only: to make the // logged Input event be ordered like the spec'ed DOM dispatch event order. By the time the Input // event fires the DOM is guaranteed to have been updated. So, no timer is needed. let input = document.getElementById("input"); for (let eventName of ["keydown", "keypress", "keyup", "input"]) { input.addEventListener(eventName, (event) => { window.setTimeout(() => { log(`${eventName}: ${input.value}`); }, 0); }); } function log(message) { document.getElementById("console").appendChild(document.createTextNode(message + "\n")); } </script> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 199587
: 373662 |
373954
|
373960
|
373961
|
373972
|
373974
|
373988