Closed sadeghbarati closed 6 months ago
Yeah I think this a great idea, cleans up quite a few utility functions :D
Going through this, I have a suspicion that we can remove a lot of the util if we use the useScrollLock
as it appears to resolve most of what those utils work to achieve. @connerblanton what are your thoughts? I raised #21 which includes this change and tested on old iPhone 8 I have (couldn't see any issues but that phone is relatively old)
I think we can definitely do this. However, I do see a problem (I don't think it's caused by this, rather we just have some more work to do for it) when there are inputs and scrollable content. I took the code from the Scrollable with inputs example from Vaul. When I test this example on ours, we automatically focus on the first input and when the keyboard is up, I am able to scroll and the page refreshes (on Safari) when I pull down.
Again, I think we can still use this, but we also need to make this example work
Ah I see, so this is limited to when the drawer is scrollable and contains input field(s)? You're right then, we'll definitely have to do some work on this
Thanks for take care of porting vaul to Vue
radix-vue
uses@vueuse/core
underhood so why not use their utility functions?They have same logic why not replace them with already defined utility in
@vueuse/core
? we can prevent duplication by doing thisisIOS
expressionOr other local utility which I can't recognize the equivalent in @vueuse/core