0

Problem with Bandbox and iPhone

asked 2020-04-12 23:58:21 +0800

andij62 gravatar image andij62
315 1 7

updated 2020-04-13 17:25:58 +0800

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

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-13 23:24:17 +0800

MDuchemin gravatar image MDuchemin
2560 1 6
ZK Team

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

link publish delete flag offensive edit

Comments

great, now it works! Many thanks for the help.

andij62 ( 2020-04-14 00:49:27 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2020-04-12 23:58:21 +0800

Seen: 7 times

Last updated: Apr 16 '20

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More