New issue
Advanced search Search tips

Issue 746590 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Focusing a sticky positioned input box may incorrectly scroll the page

Project Member Reported by yigu@chromium.org, Jul 19 2017

Issue description

What steps will reproduce the problem?
(1) Open http://jsbin.com/letazur/1/edit?html,css,js,console,output
(2) Scroll the page down and then click "Run with JS"

What is the expected result?
window.scrollY should always be 100
What happens instead?
window.scrollY is 0 and the page is scrolled back to top due to focus()


This is similar to  issue 740417 . focus() should take into account the sticky information.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f680708dab9990e1229d7e4ccb664f994cf72b1a

commit f680708dab9990e1229d7e4ccb664f994cf72b1a
Author: Yi Gu <yigu@chromium.org>
Date: Thu Jul 27 14:14:08 2017

Fix the bug that focus a sticky input box may incorrectly scroll the page

Bug:  746590 
Change-Id: I0812b2d3380ef7c8f64fed56c6371a65912013b0
Reviewed-on: https://chromium-review.googlesource.com/577961
Commit-Queue: Yi Gu <yigu@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489914}
[add] https://crrev.com/f680708dab9990e1229d7e4ccb664f994cf72b1a/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-input-box-gets-focused-after-scroll.html
[modify] https://crrev.com/f680708dab9990e1229d7e4ccb664f994cf72b1a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Comment 2 by yigu@chromium.org, Jul 27 2017

Status: Fixed (was: Started)

Sign in to add a comment