-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Scroll up not propagating to parent when at top of "short" grid #3340
Comments
This is working on the tutorial: http://ui-grid.info/docs/#/tutorial/101_intro, I assume it's a difference between rc20 and unstable, and is therefore already fixed in unstable. |
Thanks for the quick response @PaulL1. So, I guess I should downgrade to 3.0.0-rc.19 until new version is released. Thanks for the awesome work :) |
I'd be more inclined to upgrade to unstable, there's quite a bit in there. I can't recall what other bugs you're inheriting by going back to rc19. |
Ah! then it'll make sense to use the unstable. What would you say is the best way, to get the unstable version? Right now I'm getting the rc20 from bower. |
Easiest to get it from ui-grid.info/release. Check the tutorials for links. You can also clone the repo and build, but that's a bit fiddlier. Sent from my iPhone
|
Great! thanks for your help. |
I am implementing the latest version and I am also experiencing this issue. I have several small grids on a page (<= 10 rows) and the user is unable to scroll up while mouse is over the grid. The vertical scrollbar is disabled. I do also notice that this issue can be reproduced on the tutorial that you sited above. Any updates? I have just finished a massive refactor so I am not overly concerned about this issue, but my users might. Thanks so much! |
Hi, I am also experiencing this issue. And it doesn't work on http://ui-grid.info/docs/#/tutorial/101_intro . I have tried to debug on the last unstable version (RC21). I have added some comment, if it helps you to find what's wrong, I don't want to try to presume what the problem ... Code from uiGridRenderContainer directive declaration, 'gridUtil.on.mousewheel' if (event.deltaY !== 0) {
// On scroll up, scrollYAmount < 0 (-53 for me). On scroll to bottom, scrollYAmount > 0
var scrollYAmount = event.deltaY * -1 * event.deltaFactor;
scrollTop = containerCtrl.viewport[0].scrollTop; // scrollTop === 0
// Get the scroll percentage
// -- scrollTop + scrollYAmount < 0 (-53 for a scroll up)
// -- rowContainer.getVerticalScrollLength() < 0 (-299 for a grid height of 300px)
var scrollYPercentage = (scrollTop + scrollYAmount) / rowContainer.getVerticalScrollLength();
// -- 0 < scrollYPercentage < 1, but the scroll Y percentage should be 0, no ?
// -- If it's a scroll to bottom, the scrollYPercentage will be < 0 (
// -- so scrollPercentage will be equal to 0
// Keep scrollPercentage within the range 0-1.
if (scrollYPercentage < 0) { scrollYPercentage = 0; }
else if (scrollYPercentage > 1) { scrollYPercentage = 1; }
scrollEvent.y = { percentage: scrollYPercentage, pixels: scrollYAmount };
}
// [...]
// Let the parent container scroll if the grid is already at the top/bottom
if (event.deltaY !== 0 && (scrollEvent.atTop(scrollTop) || scrollEvent.atBottom(scrollTop))) {
// -- It doesn't enter here if it's a scroll up
} else {
event.preventDefault();
// [...]
} I hope this will help you ... Oh and thanks for this module ! PS :
|
Running into the same issue using the unstable release from yesterday (v3.0.0-rc.21-c0d9b48). |
👍 For this issue, I can't scroll my page up at all because I have a 100% width table. |
The scroll down have some issue too. I make some test :
I make a new PR (#3666) to ensure all case |
thanks to @500tech-user and @Jacquelin for PR's that led to this fix
I've created this plunk[1] to show the bug.
Scroll down while keeping your mouse inside the grid, keep your mouse in grid and, now try to scroll up.
This bug doesn't seem to appear in the 3.0.0-rc.19 release.
Is there a solution to this in the latest 3.0.0-rc.20 release?
[1] http://plnkr.co/edit/ke8jCXG7qsOzWRqOsrw1?p=preview
The text was updated successfully, but these errors were encountered: