-
Notifications
You must be signed in to change notification settings - Fork 88
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
Improve click handling on touch devices #683
Changes from 2 commits
ad91c9c
c5b5d51
52ac83d
d596dbf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,8 @@ export class DynamicSettingsPanelItem extends SettingsPanelItem<DynamicSettingsP | |
const handleItemClick = () => { | ||
this.displayItemsSubPage(); | ||
}; | ||
this.getDomElement().on('click', (e) => { | ||
this.getDomElement().on('click touchend', (e) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dweinber found an issue with this approach. The touchend triggers and opens the sub menu when releasing the touch after scrolling within the settings panel. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fixed again by removing the Note: The |
||
e.preventDefault(); | ||
e.stopPropagation(); | ||
handleItemClick(); | ||
}); | ||
|
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.
This only adds the hover style on devices where hover is supported.