-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: no focus after display horizontal paging page content #330
Conversation
@@ -226,6 +226,7 @@ const menuItems = computed<MenuItemAttrsProps[]>(() => itemsAsArray.value.map((i | |||
item, | |||
]; | |||
}, | |||
tabindex: isActive.value ? '-1' : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlanLes I have one TS error; Can you help me and know how to fix it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, sure what's the error? :)
kkk, I'm on it :)
@@ -226,6 +226,7 @@ const menuItems = computed<MenuItemAttrsProps[]>(() => itemsAsArray.value.map((i | |||
item, | |||
]; | |||
}, | |||
tabindex: isActive.value ? '-1' : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does the job :)
tabindex: isActive.value ? '-1' : null, | |
tabindex: isActive.value ? '-1' : undefined, |
tabindex doesn't seem to accept the null
value :)
but I'm not sure if it wouldn't be better to implicitly not set the tabindex
property at all... instead of setting it to undefined
.
It could be done with this line instead:
tabindex: isActive.value ? '-1' : null, | |
...(isActive.value ? { tabindex: '-1' } : {}), |
* fix: no focus after open new page * feat: focus menu button on back * fix(ts): tabindex in menuItems * fix: use nextTick to prevent to fast focusing * fix(ts): solve TS18047 and TS2464 errors * fix(ts): solve TS7053 error
New focus functionality in this PR.