Closed panoukos41 closed 5 months ago
I like the concept! I think it is an easy solution for the problem. I added some comments regarding implementation details and conventions.
As for the mousemove
event the problem here is that this would fire a lot of events which will impact performance when the component is server side rendered. Instead we might want to disable the mouseenter
logic while scrolling, although that might be difficult to implement.
I can't see any comments, was it somewhere else?
I had to complete the review, my bad.
If anything else needs to be resolved let me know and thanks for bearing with me 😅
Looks good to me! I will check it out locally today or latest tomorrow and test a few things between web assembly/server mode but if there are no more concerns I will merge it.
Thank you very much for your contribution so far!
As discussed in #52 this implements
ScrollIntoView
in a generic way inAriaPopupExtensions
Implementation
Since each item has an
Id
it worked forListBox
andMenu
by just passing theJSRuntime
to the appropriate modified method (I made it optional but maybe a flag would be appropriate).For
Popover
I think we would need more changes to provide access to Ids etc. We could also make the extension public for easier access to developers to customise it as they see fit.The discarding of the task is intentional since the method is already
void
and at the same time it should not interupt the ui loop if something goes wrong like not finding the element if it was removed from the dom.To Discuss
While using it I noticed the following: As you go up or down sometimes (probably when scrolling stops) the
mouseenter
event fires as the mouseenters
a newli
item producing the following effect (as you go up/down the element below the mouse is selected)Reading around some answers in SO I came accross a solution that suggests to use the
mousemove
event as themouseenter
works as expected (the mouse entered a new element) but we don't really want it to fire during keyboard scrolling. Here is the result with themousemove
event which does fix the problem:Should I commit the change for the
mouseenter
too?