8000 Pages do not scroll to element when opened in Chrome background tab · Issue #7168 · mdn/yari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Pages do not scroll to element when opened in Chrome background tab #7168
Closed
@jordanbtucker

Description

@jordanbtucker

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#examples

What specific section or headline is this issue about?

All headlines on all pages

What information was incorrect, unhelpful, or incomplete?

When a URL with a hash containing an element ID is opened in a background tab in Chrome, the page does not scroll to the element with that ID when the tab is brought to the foreground. When the same URL is opened in a foreground tab, the page scrolls correctly.

Steps to reproduce:

  1. Create a page with a link to an MDN URL with a hash property matching the ID of a valid element, like this URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#examples
  2. In Chrome, right-click the link and select Open link in new tab. This will open the page in a background tab.
  3. Open the background tab to bring it to the foreground.
  4. Note that the page has not scrolled to the element, e.g. the Examples section.

It appears that MDN is using a custom smooth-scrolling feature that does work when a tab is opened in the background. That feature should detect background tabs and possibly wait for the user to open the tab before scrolling.

What did you expect to see?

Pages should scroll to the correct section even when opened in a background tab.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIf you know something about this topic, we would love your help!p2We want to address this but may have other higher priority items.uxmake the user experience awesome🐛 bugSomething isn't working, or isn't working as expected

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0