summaryrefslogtreecommitdiffstats
path: root/wp-includes/js/admin-bar.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
commit0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch)
treee139a90049b158d4eed892d1662ee7f5c358fa31 /wp-includes/js/admin-bar.js
parentAdding upstream version 6.5.5+dfsg1. (diff)
downloadwordpress-upstream.tar.xz
wordpress-upstream.zip
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/js/admin-bar.js')
-rw-r--r--wp-includes/js/admin-bar.js36
1 files changed, 1 insertions, 35 deletions
diff --git a/wp-includes/js/admin-bar.js b/wp-includes/js/admin-bar.js
index 01b175d..eb18c61 100644
--- a/wp-includes/js/admin-bar.js
+++ b/wp-includes/js/admin-bar.js
@@ -95,11 +95,6 @@
} );
}
- if ( skipLink ) {
- // Focus the target of skip link after pressing Enter.
- skipLink.addEventListener( 'keydown', focusTargetAfterEnter );
- }
-
if ( shortlink ) {
shortlink.addEventListener( 'click', clickShortlink );
}
@@ -174,36 +169,7 @@
}
/**
- * Focus the target of skip link after pressing Enter.
- *
- * @since 5.3.1
- *
- * @param {Event} event The keydown event.
- */
- function focusTargetAfterEnter( event ) {
- var id, userAgent;
-
- if ( event.which !== 13 ) {
- return;
- }
-
- id = event.target.getAttribute( 'href' );
- userAgent = navigator.userAgent.toLowerCase();
-
- if ( userAgent.indexOf( 'applewebkit' ) > -1 && id && id.charAt( 0 ) === '#' ) {
- setTimeout( function() {
- var target = document.getElementById( id.replace( '#', '' ) );
-
- if ( target ) {
- target.setAttribute( 'tabIndex', '0' );
- target.focus();
- }
- }, 100 );
- }
- }
-
- /**
- * Toogle hover class for mobile devices.
+ * Toggle hover class for mobile devices.
*
* @since 5.3.1
*