Make WordPress Core

Changes between Version 4 and Version 5 of Ticket #55143


Ignore:
Timestamp:
09/15/2022 11:03:03 PM (20 months ago)
Author:
joedolson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #55143 – Description

    v4 v5  
    44Twenty Twenty One contains code that intercepts all anchor links containing a '#' and moves scroll position to that link. This causes an undesirable focus position movement for any link containing a '#' character that is not intended to move focus.
    55
    6 ```
    7         /**
     6
     7{{{
     8/**
    89                 * Close menu and scroll to anchor when an anchor link is clicked.
    910                 * Adapted from Twenty Twenty.
     
    2324                        }
    2425                } );
    25 ```
     26}}}
     27
    2628
    2729This code adds a listener to all links that scrolls to that target anchor. For any case where a link is used to open a modal, an accordion, or as a faux-button in any way while containing a hash character, this will cause problems.