-
Notifications
You must be signed in to change notification settings - Fork 80
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: do not dispatch cell-focus on mouse up outside of cell #3587
Conversation
@@ -685,13 +685,16 @@ class Grid extends ElementMixin( | |||
// focusable slot wrapper, that is why cells are not focused with | |||
// mousedown. Workaround: listen for mousedown and focus manually. | |||
cellContent.addEventListener('mousedown', () => { | |||
if (window.chrome) { | |||
if (isChrome) { |
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.
The previous check did not work properly in tests with headless Chrome.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
* fix: do not dispatch cell-focus on mouse up outside of cell * import chrome check from test helpers * address review comments * add test for clicking on cell content child * refactor to skip whole suite
* fix: do not dispatch cell-focus on mouse up outside of cell * import chrome check from test helpers * address review comments * add test for clicking on cell content child * refactor to skip whole suite
…3593) * fix: do not dispatch cell-focus on mouse up outside of cell * import chrome check from test helpers * address review comments * add test for clicking on cell content child * refactor to skip whole suite Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
…3594) * fix: do not dispatch cell-focus on mouse up outside of cell * import chrome check from test helpers * address review comments * add test for clicking on cell content child * refactor to skip whole suite Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
This ticket/PR has been released with Vaadin 23.1.0.alpha1 and is also targeting the upcoming stable 23.1.0 version. |
Description
Fixes a workaround in Chrome for the cell-focus event, where a mouse up event outside of the grid could trigger a cell focus event from a cell. The fix involves checking if the mouse up event occured on the same cell as the mouse down event.
Fixes vaadin/flow-components#2863
Type of change