Closed kwypchlo closed 6 years ago
@ThomasBurleson any love for my issue? pretty please :cake:
+1
Same here, +1
@kwypchlo I spent some time working on this last week and have come to the following conclusions:
<md-content>
to the bottom, wait until the scrolling settles (i.e. the scrollbars disappear) and then scroll down again; this seems to let Safari know that you've reached the bottom of the page and scroll the page body so that you can see the content under the keyboardSo I'm not sure if there is anything we can do to "fix" this. The only real "fix" I know of is to fill the body with your content and let the browser handle the scrolling for you. Obviously, this isn't ideal for many situations.
The only other thing I can think of is to disable browser scrolling altogether (overflow: hidden
) and attempt to handle it manually in pure JS (you can still set scrollTop
, top
or maybe even a CSS transition). This way, we could potentially watch the momentum scrolling, and if they hit the top, transition the remaining momentum into the parent scrollable (a parent <md-content>
or perhaps the <body>
). But this sounds like a lot of work. If I recall correctly, though, this is the final approach that SproutCore settled on after many, many attempts to get their ScrollView right.
@kwypchlo Are my above conclusions correct as far as you know? You mentioned that it worked when you removed the code, but that's not what I found.
@ThomasBurleson Any thoughts on my potential solution above of the manual scrolling approach?
Thanks for the response. Let me look at this again and I will come back with a reply :)
Closing this as it is assumed to be working since feedback to the above investigation was not provided.
Hello,
There is an issue that prevents ipad/iphone users to scroll down to the bottom of the page when virtaul keyboard is open. This code snippet below in md-content directive makes browser never touch top and bottom of the page to prevent the bouncing effect on ipad/iphone.
Steps to reproduce:
My guess is, because it works when you comment out
node.scrollTop -= 1;
, browser detects if user scrolled down to the bottom of the page and scrolls below because it detects the keyboard. Since we never achieve bottom of the page because md-content bounces us back, we cannot go below the keyboard.By the way, there is workaround for that - you can use arrows to tab to next field and the page scrolls fine or you can position the page in a way that the input you will click would appear below the virtual keyboard so you are automatically scrolled a bit when the keyboard slides up and then it all works fine.
This is extremely high priority for me, please consider some action. I alone didn't think of any good workaround for that but I can help with pull request if anyone points me in the correct direction.