Skip to content

Commit 9b9ce3a

Browse files
authored
fix(f6navigation): correct navigation order (#11942)
Fixes: #11902
1 parent e5fa241 commit 9b9ce3a

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

packages/base/src/features/F6Navigation.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { getFeature, registerFeature } from "../FeaturesRegistry.js";
22
import { isF6Next, isF6Previous } from "../Keys.js";
3-
import { instanceOfUI5Element } from "../UI5Element.js";
43
import { getFirstFocusableElement } from "../util/FocusableElements.js";
54
import getFastNavigationGroups from "../util/getFastNavigationGroups.js";
65
import isElementClickable from "../util/isElementClickable.js";
@@ -41,18 +40,12 @@ class F6Navigation {
4140
}
4241

4342
async groupElementToFocus(nextElement: HTMLElement) {
44-
let nextElementDomRef = nextElement;
45-
46-
if (instanceOfUI5Element(nextElement)) {
47-
nextElementDomRef = nextElement.getDomRef() || nextElement.firstElementChild as HTMLElement;
48-
}
49-
50-
if (nextElementDomRef) {
51-
if (isElementClickable(nextElementDomRef)) {
52-
return nextElementDomRef;
43+
if (nextElement) {
44+
if (isElementClickable(nextElement)) {
45+
return nextElement;
5346
}
5447

55-
const elementToFocus = await getFirstFocusableElement(nextElementDomRef);
48+
const elementToFocus = await getFirstFocusableElement(nextElement);
5649

5750
if (elementToFocus) {
5851
return elementToFocus;

0 commit comments

Comments
 (0)