Skip to content
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: hide tooltip while scrolling #4819

Merged
merged 2 commits into from
Oct 25, 2022
Merged

Conversation

sissbruecker
Copy link
Contributor

Description

Closes the grid's tooltip when the user starts scrolling to prevent the tooltip overlay from blocking scroll events on the grid. When using keyboard navigation the tooltip is not closed. While scrolling, the tooltip is not opened again on mouseenter to avoid the tooltip rapidly opening and closing.

Fixes #4766

Type of change

  • Bugfix

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
4.9% 4.9% Duplication

@@ -209,6 +211,39 @@ describe('tooltip', () => {
expect(tooltip.opened).to.be.false;
});

it('should hide the tooltip when starting scrolling', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also solves an issue in Safari which does not trigger mouseenter while scrolling (with a trackpad at least):

Bildschirmaufnahme.2022-10-25.um.10.04.10.mov

Comment on lines 3 to -8
export const flushGrid = (grid) => {
grid._observer.flush();
grid._afterScroll();
if (grid._debounceScrolling) {
grid._debounceScrolling.flush();
}
grid._afterScroll();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes flushGrid to also clear the scrolling attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[grid] Cell tooltip can prevent grid from scrolling
3 participants