We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acd1f01 commit 688f5d8Copy full SHA for 688f5d8
src/tpl/defaultTheme/frontend/index.js
@@ -154,10 +154,13 @@
154
155
function keepFocusOnBackwardForward() {
156
function onFocus(e) {
157
- var link = e.target;
158
- while (link && !(link instanceof HTMLAnchorElement)) {
159
- link = link.parentElement;
160
- }
+ var link = e.target.closest ? e.target.closest('a') : (function () {
+ var anchor = e.target;
+ while (anchor && !(anchor instanceof HTMLAnchorElement)) {
+ anchor = anchor.parentElement;
161
+ }
162
+ return anchor;
163
+ }())
164
if (!link || link === lastFocused) return;
165
lastFocused = link;
166
}
@@ -1157,4 +1160,4 @@
1157
1160
enableKeyboardNavigate();
1158
1161
enhanceUpload();
1159
1162
enableNonRefreshDelete();
-})();
1163
+}());
0 commit comments