-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(Autocomplete): links not opening in new tab on meta key modifier #8997
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
base: main
Are you sure you want to change the base?
Conversation
Build successful! 🎉 |
if (item instanceof HTMLAnchorElement && item.href) { | ||
openLink(item, e.nativeEvent); | ||
} else if (item) { | ||
item.click(); |
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.
better this way? or better to use
item.dispatchEvent(new PointerEvent('click', {...})
or item.dispatchEvent(new e.nativeEvent.constructor(e.nativeEvent.type, e.nativeEvent))
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.
I think that makes more sense. Just updated.
Build successful! 🎉 |
Closes #8992
✅ Pull Request Checklist:
📝 Test Instructions:
Go to an Autocomplete story, keyboard navigate down to 'Google', press
⌘+Enter
, and verify that the link is opened in a new tab.🧢 Your Project: