the browser auto invoke keyup. keydown in every single input if these inputs are hidden and the password is saved
Reported by
haith...@mellanox.com,
Dec 24 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36 Steps to reproduce the problem: 1. open any page that has hidden inputs (including password) and none hidden login inputs 2. enter username and password and submit the form 3. when chrome asks you to save the password , click yes 4. Now if you refresh the page, chrome will invoke keydown and keyup in each hidden input that has event handler What is the expected behavior? keydown and keyup events handlers should not be invoked unless the user either invoke these events manually from keyboard or from javascript code What went wrong? in single page application where we have hundreds of inputs, all these inputs events will be triggered automatically so it cause unexpected behavior Did this work before? Yes Does this work in other browsers? N/A Chrome version: 63.0.3239.108 Channel: stable OS Version: 10.0 Flash Version:
,
Dec 25 2017
,
Dec 26 2017
@Reporter: Tried testing this issue from our end with steps mentiopned below: 1) Launched chrome reported version and downloaded and opened the index.html file provided in comment#0 2) Clicked on show form and provided Username and Password and click on login 3) Not able to see the window request for "save password" Please find the attached screenshot for your reference and letus know if we miss anything in reproducing this issue adn provide your feedback on it, if possible can you please provide the screen cast for the issue you are facing which will help us in further triagignt he issue. Thanks!
,
Dec 26 2017
,
Dec 27 2017
sorry for not mentioning that, you should run the html page as server not as file from the system. so chrome be able to ask you to save the password. and you should click yes save the password. as you see in the screenshot on the left side the password is not saved yet and nothing is triggered. on the right side the password is saved and inputs are triggered automatically just after refreshing the page every single hidden input will have all events triggered (if these events have handlers)
,
Dec 27 2017
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 28 2017
Able to reproduce the issue on reported version 63.0.3239.108 and latest canary 65.0.3305.0 using Windows-10, Ubuntu 14.04 and Mac 10.12.6 hence providing Bisect Info Bisect Info: ================ Good build: 59.0.3047.0 Bad build: 59.0.3048.0 You are probably looking for a change made after 458458 (known good), but no later than 458459 (first known bad). https://chromium.googlesource.com/chromium/src/+log/31e38516550d24160a228adde328ec7ad9c7ac54..4a42d386112ff65fe17baa0c633e5ccc44989aa5 Review-Url: https://codereview.chromium.org/2750323003 @kolos: Please confirm the issue and help in re-assigning if it is not related to your change. Thanks!
,
Dec 28 2017
,
Jan 25 2018
I was also able to reproduce it with a simple example, but it wasn't necessary to hide the fields.
I tested it in versions: 63.0.3239.132 (Official Build) (64-bit) and 64.0.3282.119 (Official Build) (64-bit), and using Windows 10.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test</title>
</head>
<body>
<form method="post" action="">
<input name="username">
<input type="password" name="password">
<button>Submit</button>
</form>
<script>
document.documentElement.addEventListener("keyup", function(event) { console.log(event) });
document.documentElement.addEventListener("keydown", function(event) {console.log(event) });
</script>
</body>
</html>
Javascript output:
Event {isTrusted: true, type: "keydown", target: input, currentTarget: html, eventPhase: 3, …}
Event {isTrusted: true, type: "keyup", target: input, currentTarget: html, eventPhase: 3, …}
,
Jan 25 2018
In my previous comment, the version I used was 64.0.3282.119, not 63.0.3239.132. (There was an update yesterday https://chromereleases.googleblog.com/2018/01/stable-channel-update-for-desktop_24.html) With this version it seems that the 'keyup' and 'keydown' events are triggered just once if the input is not hidden.
,
May 14 2018
When Chrome autofills any value (password, address, etc.), Chrome sends a bunch of events to an autofilled field. We need it to notify the page about autofilled values. Unfortunately, it may look weird for some pages, but we have to do that. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by haith...@mellanox.com
, Dec 24 2017