-
Notifications
You must be signed in to change notification settings - Fork 107
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
How "wheelHandler" is working #198
Comments
@MiguelAngel82 Your template looks unpredictable from the point of the veiwport logic due to |
Hi @dhilt, Thank you very much for your quick response! Sorry, I haven't checked the documentation for ui-scroll-th and ui-scroll-td, it could be a good solution. But, in this case, I have a little problem. The reason why
So the second "tr" is shown when the first "tr" is clicked and is shown as a detail of the row. With a "ng-repeat" solution I've found that it could be done with "ng-repeat-start" and "ng-repeat-end", but I don't know if is possible to do with the solution you suggested. Thanks! |
@MiguelAngel82 You can apply a single-tr approach in your template:
This would require to re-skin the view, but it seems possible because of similar structure of 2 trs from your current approach. Also, I believe, |
Hi again @dhilt. And thanks again for your response and effort ;) I've tried the solution without re-designing, using
But I have the same problem as the original issue. When I try to make a wheel mouse scroll at first time it doesn't work. I've checked that is the same, is in the Am I missing something? Is there something wrong in my implemented solution? Thanks! |
@MiguelAngel82 I believe, the wheel handler is not about the issue; we can try to make sure of this if you would try to scroll by clicking on the scroll bar. May I ask you to build a minimal repro? You can take this Plunker as a start point (but use the latest versions of AngularJs and ui-scroll). Then I will dig into problem. |
Hi again @dhilt. I've created a couple of plunkers and they work perfectly. The reason why I created two versions is because in my project, apart of using ui-scroll, Bootstrap 3 is used. The table has "table" class, and when this class is removed, in my project, ui-scroll works perfectly, but when is added, the problem appears :/ So here is the two working plunkers:
So I'm confused, probably there are more things involved in my project that are affecting ui-scroll... Thanks anyway ;) |
Hi @dhilt. I've been investigating why adding "table" class to the table is affecting Just out of curiosity, what is the aim of Thank you! |
@MiguelAngel82 Well... Here the ui-scroll gets a bunch of items that is less than expected buffer size, that means that this is the last pack on current direction (scrolling up). And here is the condition for fetching more items. Since Wheel handler does nothing but prevents scroll events bubbling when you are scrolling over the ui-scroll viewport. It is due to Hill30/NGScroller#39. |
Hi again @dhilt. Sorry if I bother you a lot :( I've been digging a little bit more and what I've found (probably is a hint for you or it says nothing), is that when "table" class is added, So when "table" class is added, the function Is this a hint for you? Do you think is worth that I continue investigating on it? BTW, thank you very much for your explanation, they aer being very useful to understand the plugin ;) Thanks! |
@MiguelAngel82 It looks like your styles make the viewport fall into race condition with rows visibility, because |
Hi @dhilt, Sorry, but when you say "The main rule is test the DOM specific logic if you see that different styles give you different behavior.", what is exactly are you referring to? I mean, are you referring to debug ht "ui-scroll.js" library and all fuctions that are called? I'm debugging it, putting breakpoints in all functions involved, but probably there is another easier way to do it. Thanks. |
@MiguelAngel82 As I noticed, you have a situation when applying some css class to the viewport breaks ui-scroll behaviour. If we want to understand what exactly affects scroller, we may
The second step is about debugging ui-scroll library. Since I have no repro I suggested you to do it. And DOM specific methods should be entry points during debug. If debugging is not an option for you, you may post a repro and then I will try to do it. |
Hi all!
Sorry, but I have another question about how the plugin works. I have a div as "ui-scroll-viewport", with a custom height, and inside it a table, something like that:
The data is retieved via endpoint call, with a size of 10 in each call. Everything works as expected in Firefox, but in Chrome, when the data fetched is less than 20, and viewport div height is more than 300px, wheel mouse is not working. I've gone deep in the JS and the problem is in the
wheelHandler
function, that when the wheel mouse is not working,buffer.bof
is set totrue
, but in the other case, is set tofalse
. Nevertheless, and although I've tried to investigate it, I don't know howbuffer.bof
is set to true.Thanks in advance!
Regards,
Miguel.
The text was updated successfully, but these errors were encountered: