-
Notifications
You must be signed in to change notification settings - Fork 957
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
Select dropdown is positioned incorrectly when scrolling #1071
Comments
@colinhostetter works as expected on mobile. And worked same way on previous RNW versions. Could it be RNW issue? |
Hey @artyorsh thanks for replying! I'm not sure if it's a RNW thing -- when I switch to the previous version of Expo in the link I gave, it is still broken. (Not sure if that would switch it to a previous RN version or not.) Any idea whether someone will be able to look into this? Unfortunately it does make the Dropdown and Tooltip components unusable for projects that are using web. |
@colinhostetter |
@artyorsh I'm also using RNW 0.11.7, which makes me think it's not an RNW issue. Maybe something differing in our setups? |
After noticing that your example is within a ScrollView or some other kind of scrollable container, I tried moving mine into one, and it seems to work there: https://snack.expo.io/tkV3YMQ2x So this appears to be a ui-kitten bug when this component is rendered outside of a ScrollView. |
@colinhostetter any purpose of using |
Ok, I guess it's not specific to |
I guess the |
@colinhostetter we focus mobile-first, where is no option to scroll without putting contents somewhere else besides ScrollView. Could you please describe your use-case (without having a ScrollView) in more details? |
Yep, makes sense. I'm actually pretty new to mobile development and was prototyping this stuff on web and hadn't built out how things like scrolling should work in my app on mobile, and there was no obvious reason to think that that had anything to do with this problem. It seems like just using ScrollViews should resolve the problem, although it is very confusing, so it might be worth fixing for future newcomers like me. |
I just found this bug while developing an application for both mobile and web, and it's quite annoying. On web, scrolling the document body instead of a ScrollView is a really good practice, as is what most browsers will expect and behave accordingly, especially mobile browsers like Safari on iOS, which will hide the URL bar and the bottom action buttons to give more space to the user when scrolling down the page, and show them again when scrolling up. If we build our web applications using a ScrollView instead of letting the document body scroll, the browser won't be able to detect scroll interactions, resulting in a weird user experience. Other weird bugs will happen as well, like accidental scrolling of the document instead of the inner ScrollView which will make the user think the page cannot be scrolled further, when in reality it can. Although UI Kitten is mobile first, it's the UI kit for RN with the best web support out there, so it pains me to see document body scrolling not supported. Is there any chance this could be worked on, or could I be pointed in the right direction if I have the time to contribute with a fix myself? |
@artyorsh sorry for pinging you, could you comment on this? Thank you |
🐛 Bug Report
On web, when the page is scrolled to the top, the Dropdown component works as expected. However, when the dropdown is opened while the page is scrolled down a bit, the items appear in the wrong place; they're positioned too high on the page. There's also a similar bug with the Tooltip component.
To Reproduce
See example here: https://snack.expo.io/rrdVu5obV
When you click the dropdown while scrolled to the top, it works properly. However, if you scroll down a little and then click it, the items will appear way above where they're supposed to.
Expected behavior
Dropdown items should appear just below the main UI element.
Link to runnable example or repository (highly encouraged)
https://snack.expo.io/rrdVu5obV
UI Kitten and Eva version
Environment information
The text was updated successfully, but these errors were encountered: