-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
if several bandboxes are arranged one below the other and you want to open first the bandbox which is only scrolled into the view (e.g. Bandbox 6), then it happens that the bandbox is not opened with the first click on the searchfield. The bandbox scrolled further up but does not open. It only opens with a second click.
I did an example in zkfiddle: https://zkfiddle.org/sample/30qt4i4/1-Problem-with-bandbox-and-ios
Direct runnable: https://zkfiddle.org/direct/30qt4i4/1/v9.0.0-Problem-with-bandbox-and-ios?run=922t8q
I tested it with Safari and Chrome on iPhone. The error occurs with ios in both browsers.
Regards Andi
Hi andij62,
In that case, it looks like iOS version of the webkit engine does something non-standard, and trigger a scrolling event when the user focuses a input which is currently out of the scroll position of the screen. Since iOS forces every browsers to use this engine (even chrome) it makes sense that it would affect all iOS browsers.
Looking around online, this seem to be a know issue with iOS browsers. The common recommendation seem to be to set the body element as position fixed to prevent the browser from jumping around.
Here's an updated fiddle showing such a workaround: https://zkfiddle.org/sample/30qt4i4/5-Problem-with-bandbox-and-ios
based on topics: https://forums.developer.apple.com/thread/26802 https://stackoverflow.com/questions/37287148/ios-safari-chrome-unwanted-scrolling-when-focusing-an-input-inside-the-modal
PS: I recommend sending a link directly to the edit page of the ZKFiddle :) makes it easier to read what's happening in the code
Asked: 2020-04-12 23:58:21 +0800
Seen: 7 times
Last updated: Apr 16 '20