Closed infacto closed 3 years ago
Thanks, I can reproduce this. Looks like these -1px
margins go all the way back to Ionic v3: https://github.com/ionic-team/ionic-v3/blob/master/src/components/select/select.scss#L7-L15.
The original context is no longer there as I cannot find an associated PR or GitHub issue. My current guess is this was added to work around some old Chromium/WebKit/UIWebView bug.
I will look into removing it.
edit: One side effect is that the -1px
margins add the rubber band effect on non-scrollable content on iOS. That being said, I am not sure non-scrollable popovers should rubber band. I need to investigate this a bit more to what native does.
edit 2: Confirmed by testing a native popover on iOS that non-scrollable popovers should not rubber band.
Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic-framework/pull/23972 and a fix will be available in an upcoming release of Ionic Framework.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Prequisites
Ionic Framework Version
Current Behavior
The popover always scrolls a pixel which looks weird and untidy.
👎
Why is
margin-top
andmargin-bottom
set to-1px
?Related source code.
Expected Behavior
Don't scroll. Set margin to 0 and in this example padding is also 0. But margin 0 will fix this issue.
👍
Steps to Reproduce
Play with that. Then add following css to the
global.scss
.Enjoy.
Personally I prever
ion-no-padding
for lists. We could set this by default for the list. Just consider it for the select popover interface. But the primary issue is to fix the unnecessary scroll behavior (margin).Ionic Info