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: prevent grid body from expanding on dragover #3263

Merged
merged 3 commits into from
Jan 7, 2022

Conversation

tomivirkki
Copy link
Member

Fixes vaadin/flow-components#1610

The core of the fix is an additional CSS rule that forces the drag-over indicator to be smaller when dragging below the last row (with allRowsVisible on). This essentially prevents the container from expanding in height and becoming scrollable.

The CSS selector required adding a new state attribute (last) for the last non-hidden body row element.

@web-padawan
Copy link
Member

Seems like screenshots contain differences:

 ❌ grid > drag and drop > dragover below last row when all rows visible
      Error: Visual diff failed. New screenshot is 0.72% different.

@tomivirkki
Copy link
Member Author

Seems like screenshots contain differences:

Ah, seems that the grid visual tests are using before (instead of beforeEach) so the differences are caused by side-effects from other tests. Didn't notice this locally since I was using it.only.

@sonarcloud
Copy link

sonarcloud bot commented Jan 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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
0.0% 0.0% Duplication

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.

Tickle a Grid with DnD and heightByRows makes it giggle every time.
3 participants