New issue
Advanced search Search tips

Issue 673396 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Chrome 55 on OSX no longer jumps to hidden anchor targets

Reported by epriest...@phacility.com, Dec 12 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14

Steps to reproduce the problem:
The test case contains a link which jumps to a point later in the document. The link target is completely hidden by a containing <div /> with "overflow: hidden".

Even though the target is hidden, Safari, Firefox and earlier versions of Chrome still jump to this target when the link was clicked. Chrome 55 no longer does.

1. Open test case document in Chrome 55 on OSX.
2. Resize and scroll the window so the "Jump to Hidden Target" link is visible, but the plain "Target" text is not (it should be scrolled off the bottom of the viewport).
3. Click the "Jump to Hidden Target" link.

Optionally, for comparison:

4. Click the "Jump to Visible Target" link.
5. Observe that navigation occurs normally because the visible target has 1px of non-hidden content that is merely invisible to the human observer.

What is the expected behavior?
The browser jumps to the target, scrolling the text "Target" into view.

What went wrong?
The click is ignored and no navigation occurs within the document.

Did this work before? Yes Chrome 54

Does this work in other browsers? Yes

Chrome version: 	55.0.2883.87 (Official Build) (64-bit)  Channel: n/a
OS Version: OS X 10.10.5
Flash Version: 

It's possible this is an intentional change since Chrome's behavior isn't unambiguously wrong, but I couldn't immediately find anything that suggests this is intentional in the changelog.
 
anchor-testcase.html
533 bytes View Download
I can confirm it too, both on Mac OS and Linux.

UserAgent (Linux): Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

Comment 2 by rsesek@chromium.org, Dec 12 2016

Components: Blink>HTML>A Blink>Scroll
Labels: OS-Linux
Owner: sunyunjia@chromium.org
Status: Assigned (was: Unconfirmed)
You are probably looking for a change made after 415062 (known good), but no later than 415114 (first known bad).
CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/9fdc7e10d5e08818fd54a1e7a1d868b0ff8b20dd..540983ab54c3259bb9b548bfd8c1d95367fa15f2


Maybe https://chromium.googlesource.com/chromium/src/+/29cea456ef3562dd7364e8e6e80aaddc0365a516. Which was first in 55.0.2845.0 but was also merged to 54.0.2840.20.

Comment 3 by rsesek@chromium.org, Dec 13 2016

Cc: bokan@chromium.org
Labels: -Pri-2 M-55 Pri-1
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 4 2017

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

commit 961e2d024412588edffbef5b3f6dfdfd2646761f
Author: sunyunjia <sunyunjia@chromium.org>
Date: Wed Jan 04 21:22:28 2017

Scroll the position into view when the content is not visible.

Previously, we implement scrollIntoView by scrolling the intersection of the
viewport and the content. However, when the content is not visible in the
viewport, e.g. outside boundary and the viewport's overflow attribute is
hidden, the intersection would be empty and the browser would stop the
scrolling logic. In this case, we presume the webpage wants to scroll the
position of the content but for some reason doesn't want to show it. In this
patch, we scroll the content's position for this special case.

BUG= 673396 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2576963002
Cr-Commit-Position: refs/heads/master@{#441469}

[add] https://crrev.com/961e2d024412588edffbef5b3f6dfdfd2646761f/third_party/WebKit/LayoutTests/fast/scrolling/scroll-into-view-hidden-element.html
[modify] https://crrev.com/961e2d024412588edffbef5b3f6dfdfd2646761f/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Status: Fixed (was: Assigned)
Should we merge this?

Comment 7 by bokan@chromium.org, Jan 4 2017

Status: Started (was: Fixed)
Sounds reasonable to me. Lets wait until it hits ToT to verify and then request a merge.
Labels: Hotlist-Input-Dev

Comment 9 by bokan@chromium.org, Jan 10 2017

Labels: Merge-Request-56
Verified in ToT, requesting merge.
Project Member

Comment 10 by sheriffbot@chromium.org, Jan 10 2017

Labels: -Merge-Request-56 Hotlist-Merge-Approved Merge-Approved-56
Your change meets the bar and is auto-approved for M56. Please go ahead and merge the CL manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), gkihumba@(cros), bustamante@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 10 2017

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b721546a2fda3b3b822c09af0c1ecfd783a5fcc

commit 5b721546a2fda3b3b822c09af0c1ecfd783a5fcc
Author: David Bokan <bokan@chromium.org>
Date: Tue Jan 10 20:21:49 2017

Scroll the position into view when the content is not visible.

Previously, we implement scrollIntoView by scrolling the intersection of the
viewport and the content. However, when the content is not visible in the
viewport, e.g. outside boundary and the viewport's overflow attribute is
hidden, the intersection would be empty and the browser would stop the
scrolling logic. In this case, we presume the webpage wants to scroll the
position of the content but for some reason doesn't want to show it. In this
patch, we scroll the content's position for this special case.

BUG= 673396 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2576963002
Cr-Commit-Position: refs/heads/master@{#441469}
(cherry picked from commit 961e2d024412588edffbef5b3f6dfdfd2646761f)

Review-Url: https://codereview.chromium.org/2623943002 .
Cr-Commit-Position: refs/branch-heads/2924@{#721}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[add] https://crrev.com/5b721546a2fda3b3b822c09af0c1ecfd783a5fcc/third_party/WebKit/LayoutTests/fast/scrolling/scroll-into-view-hidden-element.html
[modify] https://crrev.com/5b721546a2fda3b3b822c09af0c1ecfd783a5fcc/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Comment 12 by bokan@chromium.org, Jan 10 2017

Status: Fixed (was: Started)
Cc: rbasuvula@chromium.org
Labels: TE-Verified-M56 TE-Verified-56.0.2924.59
Tested the issue on Ubuntu 14.04 and Mac OS 10.12.2 using chrome latest Beta M56-56.0.2924.59 by following steps mentioned in the original comment. Observed that The browser jumps to the target, scrolling the text "Target" into view as expected. Hence adding TE-Verified label.

Thank you!
Please Find the screen shot for reference.
673396.ogv
739 KB View Download

Sign in to add a comment