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
Add z-index to fixedRowsBottom #6269
Conversation
I know this is out of the scope for the linked issue, but while we're near https://jsfiddle.net/tohnkvsd/ It's because And BTW. if I remember correctly @budnix removed debug overlay. Can we clean up |
No. Header should be always at the top. |
I think that this PR is a good occasion to change For example, there could be classes: .displayLayer--low {
z-index: 101;
}
.displayLayer--medium {
z-index: 102;
}
.displayLayer--high {
z-index: 103;
} And then just add these classes dynamically on |
@warpech There's a lot more
Where
Features like borders, selection, floating object and editors should hide under the fixed overlays that are above the layer the feature is located on. |
I am glad to hear that. This means that there should never be two elements with the same Anyway, my point was that it would improve the code quality to cover all these combinations using CSS class names, and never set It seems to me that this style was implemented in dd7c131, so I am happy now 😊 |
src/editors/_baseEditor.js
Outdated
@@ -371,20 +371,28 @@ class BaseEditor { | |||
* | |||
* @returns {string} | |||
*/ | |||
getEditedCellsZIndex() { | |||
getEditedCellsZIndexClass() { |
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 method is not used anywhere? Then we should remove unused code.
I'm not sure if the classes here are correct. They would give the editor same z-index
as overlay.
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.
For now, this method isn't used because we decided to permanent z-index
for editor
in every overlay.
We will use it in the next step when we implement separate editor UI
for editor input
. This method has only one goal - return appropriate overlay sections to the editor. And then we are going to add 4
to base z-index
.
…tedCellsZIndexClass method #5947
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.
src/css/handsontable.css
Outdated
z-index: -1; | ||
} | ||
|
||
.ht_editor_show { |
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.
I would call this class as ht_editor_shown
.
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.
Maybe "visible" would be better?
src/css/handsontable.css
Outdated
@@ -585,21 +585,48 @@ CheckboxRenderer | |||
background: #eee; | |||
} | |||
|
|||
.ht_clone_top { | |||
z-index: 101; | |||
.ht_editor_hide { |
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.
I would call this class as ht_editor_hidden
.
arrayFilter(childNodes, (childNode) => { | ||
if (hasClass(childNode, 'handsontableEditor')) { | ||
hasClassHandsontableEditor = true; | ||
} |
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.
Maybe use:
- Array.find or
rangeEach
with returningfalse
when the class will be found (It would break the loop.).
handsontable/src/helpers/number.js
Lines 35 to 37 in 98878a6
if (iteratee(index) === false) { | |
break; | |
} |
For me, arrayFilter
isn't the best choice.
src/editors/selectEditor.js
Outdated
@@ -66,6 +68,10 @@ class SelectEditor extends BaseEditor { | |||
close() { | |||
this._opened = false; | |||
this.select.style.display = 'none'; | |||
|
|||
if (hasClass(this.select, 'ht_editor_show')) { |
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.
Maybe all those used classed could be moved to constants on the top of the file or event to the helper?
src/editors/textEditor.js
Outdated
* @private | ||
* @type {string} | ||
*/ | ||
this.zIndexClass = void 0; |
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.
I would call this variable as layerClass
or similarly. For me, it would better call the described being, not just it's feature.
Context
After added z-indexes to selection borders (class
.current
,.area
and.fill
), and after scroll overfixedRowsBottom
selection borders overlap to fixed area.Honestly,z-index: 12
is enough to.ht_clone_bottom
class. But I decided to use the existing place (clones
class) and values to keep it easier to manage.How has this been tested?
I tested with different cell types.
Types of changes
Related issue(s):
Checklist: