This repository has been archived by the owner on Nov 11, 2017. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delegate applyTransform from list item to parent and always use top left in ListView to prevent scroll bar from being occluded.
- Loading branch information
1 parent
2dd59fb
commit c55ae13
Showing
2 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c55ae13
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.
After testing I realized that we lost transform3d-based positioning with this commit, which affects performance. This does make it look like the scroll-bar z-index issue was fixed but in reality it isn't. I'm working on a new commit which should bring back 3d transforms and fix the z-index issue. I've also opened an issue specifically for this problem as issue #54 (separating it from the inertial scroll problem of issue #48).
c55ae13
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.
See PR #55
c55ae13
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 does make it look like the scroll-bar z-index issue was fixed but in reality it isn't." What was broken after this commit? Do you have a demo of this problem? I have many doubts about this statement.
c55ae13
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.
Well, the original issue was that when using translate3d-based positioning the z-index would get screwed. Regular positioning (absolute top/left) always gave the right z-index (or I should say "never had that problem").
When you moved the applyTransform from ListViewHelper to ListView you only moved the code that handled regular positioning. Since translate3d-based positioning was no longer in play, the scroll-bar z-index looked like it had been fixed, but in reality what you removed was the thing that created the problem in the first place.
Normally this would've been great. Unfortunately, in this case the translate3d positioning was there for a reason: performance (as you can see here http://jsperf.com/translate3d-vs-positioning). By removing it you accidentally introduced a regression.
When I added the translate3ds back to the applyTransform, the z-index problem came back. The only valid solution I've found is to apply
z-index: 1;
to the listView element itself, as stated on the original issue.c55ae13
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.
Thanks for the jsperf link, one thing I noticed is the 2d css transforms perform just as well, and they also don't mess up the scroll bar z order.