-
Notifications
You must be signed in to change notification settings - Fork 75
fix: do not set z-index for sub-cells with text #7239
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
Conversation
68527b7 to
4f87395
Compare
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.
With this change, the focus outline (+ handle) of the merged cell is broken.
From the provided Merged_cell_scroll_example.xlsx:
Without the change:
With the change:
Notice that the focus outline (+ handle) is not displayed correctly when the merged cell is selected.
58148c5 to
d78526c
Compare
I reverted the initial fix and applied a new one. In the The new solution seems much cleaner and appropriate. There are similar checks in the |
f23992e to
16e9d98
Compare
|
* fix: make sure subcells are hidden * fix: do not set zindex for subcells with text and revert initial fix * test: replace the test to match the new fix
* fix: make sure subcells are hidden * fix: do not set zindex for subcells with text and revert initial fix * test: replace the test to match the new fix
* fix: make sure subcells are hidden * fix: do not set zindex for subcells with text and revert initial fix * test: replace the test to match the new fix
* fix: do not set z-index for sub-cells with text (#7239) * fix: make sure subcells are hidden * fix: do not set zindex for subcells with text and revert initial fix * test: replace the test to match the new fix * test: fix getting styles in the it
* fix: make sure subcells are hidden * fix: do not set zindex for subcells with text and revert initial fix * test: replace the test to match the new fix
* fix: make sure subcells are hidden * fix: do not set zindex for subcells with text and revert initial fix * test: replace the test to match the new fix
|
This ticket/PR has been released with Vaadin 23.5.16. |






Description
In the
Cellclass,z-indexof 1 is automatically applied to cells with text content. However, this should not be the case for sub-cells. The first sub-cell in a merged region still contains the text. Usually, this problem is hidden because initially the sub-cells are added to the DOM before the merged cell. When there are two cells with the samez-index, the last added cell is shown on top. However, when the sheet is scrolled, sometimes the sub-cell is removed and the merged cell still stays in the DOM. Scrolling back to the row, the sub-cell is added back to the DOM with the samez-indexof 1. Since the sub-cell is the last added one in this case, it is shown on top.This PR adds a check in the
Cellclass to avoid settingz-indexfor sub-cells with text.Fixes #7177
Type of change
Checklist