Wheel scrolling problem after document.write
Reported by
guany...@spap.com,
Dec 29
|
|||
Issue description
Chrome Version : 71.0.3578.98
OS Version: 10.0
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari:OK
Firefox:OK
IE/Edge:OK
What steps will reproduce the problem?
1.Run the code I provided or open the file in the attachment
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>document.write BUG</title>
</head>
<body>
<button onclick="start()">Click Me</button>
<script>
function start() {
document.write(`<html>
<head></head>
<body>
<div style="position: absolute;height: 240px;overflow: auto;width: 320px;">
Try rolling the mouse wheel<br/><br/><br/><br/><br/>
Try rolling the mouse wheel<br/><br/><br/><br/><br/>
Try rolling the mouse wheel<br/><br/><br/><br/><br/>
Try rolling the mouse wheel<br/><br/><br/><br/><br/>
Try rolling the mouse wheel<br/><br/><br/><br/><br/>
Try rolling the mouse wheel<br/><br/><br/><br/><br/>
</div>
</body>
</html>`);
document.close();
}
</script>
</body>
</html>
What is the expected result?
Mouse wheel scrolling normally
What happens instead of that?
Mouse wheel is not available
Please provide any additional information below. Attach a screenshot if
possible.
UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
,
Jan 3
Thank you, I have seen your recorded video. There is no problem with your steps, but I don't know why you can't reproduce it over there. What is certain is that my colleagues have this problem. Some are Chrome 69, windows 7 also happened. In short, except for mac, none of them works. This time I provided a screen recording, you can watch it. I think you should use more device tests, or more chrome versions, starting with 68. I can help with the test if needed. (PS: I am in China)
,
Jan 3
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 3
guanyong@spap.com: I think you are doing autoscroll (middle-click, then move the mouse to scroll) here in #c2, as opposed to rolling the wheel w/o pressing it as in #c1. Is this correct?
,
Jan 3
Ah, I see, the bug reproduces in Linux with wheel-scrolling. Keyboard scrolling works, so does scrolling through scrollbar.
Here is a minimal repro, removing "overflow: auto" fixes the problem in Linux:
<button onclick="start()">Click Me</button>
<script>
function start() {
document.write(`<div style="height: 240px; overflow: auto;">
Try wheelscrolling<br/><br/><br/><br/><br/>
Try wheelscrolling<br/><br/><br/><br/><br/>
Try wheelscrolling<br/><br/><br/><br/><br/>
Try wheelscrolling<br/><br/><br/><br/><br/>
Try wheelscrolling<br/><br/><br/><br/><br/>
Try wheelscrolling<br/><br/><br/><br/><br/>
</div>`);
document.close();
}
</script>
,
Jan 4
mustaq@chromium.org: Thanks, After removing "overflow: auto", the scroll bar acts on the body. The wheel-scrolling on the body is normal, but this is not enough. Fortunately, after I added an <iframe> to the page, the scroll wheel will work. <button onclick="start()">Click Me</button> <script> function start() { document.write(`<html> <head></head> <body> <div style="height: 240px;overflow: auto;width: 320px;"> Try rolling the mouse wheel<br/><br/><br/><br/><br/> Try rolling the mouse wheel<br/><br/><br/><br/><br/> Try rolling the mouse wheel<br/><br/><br/><br/><br/> Try rolling the mouse wheel<br/><br/><br/><br/><br/> Try rolling the mouse wheel<br/><br/><br/><br/><br/> Try rolling the mouse wheel<br/><br/><br/><br/><br/> </div> <iframe></iframe> </body> </html>`); document.close(); } </script> I think this problem is caused by a rendering state error. I hope this helps you. |
|||
►
Sign in to add a comment |
|||
Comment 1 by vamshi.kommuri@chromium.org
, Dec 31Components: Blink>Scroll
Labels: Needs-Triage-M71 Needs-Feedback Triaged-ET
2.0 MB
2.0 MB View Download