New issue
Advanced search Search tips

Issue 646738 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Cannot use internal page link to element inside overflow:hidden block (regression)

Reported by bloodsp...@gmail.com, Sep 14 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2859.0 Safari/537.36

Example URL:
https://jsfiddle.net/dkua3v94/

Steps to reproduce the problem:
1. Have an internal link (e.g. <a href="#link">) inside an element with overflow: hidden
2. Have a target (e.g. <a name="link"></a>) further down a page.
3. Click the link.

Example at https://jsfiddle.net/dkua3v94/

What is the expected behavior?
The browser window scrolls to the named anchor.

What went wrong?
The browser will not scroll to the target location.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes 53.0.2785.113

Does this work in other browsers? Yes 

Chrome version: 55.0.2859.0  Channel: dev
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 23.0 r0

Example at https://jsfiddle.net/dkua3v94/

The problem is not present in any other browsers, but I wanted to post this as a new bug because it works fine in stable (53.0.2785.113). It looks like a regression.

Defining a CSS rule later that sets the overflow to something other than hidden does not fix this behaviour.

Found in a WordPress theme with 54k sales. I have no idea how prevalent this usage is elsewhere.
https://themeforest.net/item/bridge-creative-multipurpose-wordpress-theme/7315054

Issues that may or may not be related:
https://bugs.chromium.org/p/chromium/issues/detail?id=630632 (perhaps fixing caused this?)
 
Labels: Needs-Bisect
Components: -Blink Blink>Scroll
I reverted the change from 630632 locally and it didn't fix the issue. Bisect needed.
Cc: bokan@chromium.org dtapu...@chromium.org
Labels: -Type-Bug Type-Bug-Regression
Owner: sunyunjia@chromium.org
Status: Assigned (was: Unconfirmed)
I bisected the change to 
https://chromium.googlesource.com/chromium/src/+/29cea456ef3562dd7364e8e6e80aaddc0365a516

Reverting that change fixes the issue.
Cc: sunyunjia@chromium.org
 Issue 646008  has been merged into this issue.
Status: Started (was: Assigned)
Labels: -Needs-Bisect
Removing bisect label as per comment#3 ? 

However, feel free to add if required.

Thank you!
Issue 647161 has been merged into this issue.
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 15 2016

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

commit 6d73ab5ed5d9b00bc48da255dc6599e90e72f599
Author: sunyunjia <sunyunjia@chromium.org>
Date: Thu Sep 15 13:36:35 2016

Enable the scroll of empty elements by setting the rect's size to 1.

LayoutBox::scrollRectToVisible will return if the new rect to be scrolled is
empty after clipped by layerBounds. However, the rect to be scrolled might be
an empty rect originally. A common case is empty <a> elements used as named
anchors for navigation. This patch sets the size of the empty rect to 1 so that
it can still be scrolled.

BUG= 646738 

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

[add] https://crrev.com/6d73ab5ed5d9b00bc48da255dc6599e90e72f599/third_party/WebKit/LayoutTests/fast/scrolling/hashtag-autoscroll.html
[modify] https://crrev.com/6d73ab5ed5d9b00bc48da255dc6599e90e72f599/third_party/WebKit/Source/core/layout/LayoutBox.cpp

Status: Fixed (was: Started)
Well done, speedy fix.
Labels: Hotlist-Input-Dev

Sign in to add a comment