Styling based on :target pseudo-selector breaks hash navigation

Confirmed Issue #8271689 • Assigned to Kevin B.


Nolan L.
Jul 25, 2016
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 4 people

Sign in to watch or report this issue.

Steps to reproduce

  1. Put <div>s with ids on a page.
  2. Add some links to those divs using hash links (e.g. #foo).
  3. Style the divs based on the :target pseudo-selector.
  4. Note that you can click on those links, but you can’t go back/forward using the browser back/forward buttons. The divs do not properly update their style.

Attached is a page that demonstrates this (index.html). Note that this page works perfectly in Firefox, Chrome, and Safari. you can click the links, press back and forward, and the modals disappear and reappear as expected.

Here is a live example:

The bug seems to be caused by the :target styling. Removing this styling causes Edge to function the same as other browsers. Here is a live example of that: (also attached as working.html).


2 attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Bogdan B.”

    Changed Assigned To from “Bogdan B.” to “Rossen A.”

    Changed Status to “Confirmed”

    Changed Assigned To from “Rossen A.” to “Kevin B.”

  • It’s been over two years…where’s the fix?

You need to sign in to your Microsoft account to add a comment.

Sign in