Fix: Safari on iPhone in landscape, more than one tab open hides the lower part of virtual tours

  • Hi all,

    Having more than one tab opened in Safari, putting an iPhone (mine is a 6S Plus) in landscape mode prevents KRPano from hiding Safari bars and hides the lower part of the window, cutting buttons at the bottom out of the screen.

    I tried to use window.innerHeight in order to get the correct available height. Here is a javascript that worked for me:

    Surely it can be written better and optimized, but it seems that it fixes the problem. I put it in the html page that embeds the KRPano viewer.

    Best regards,
    Hans

  • Thanks for trying.
    Yes, the bars at the top don't disappear, I forgot to tell that. But on my iPhone at least it fixes the problem with the bottom. What iPhone and what KRPano version did you use? How did you implement the code? Have you a page link to look at?
    Please let me know.
    Best,
    Hans

  • this solution is actually not that bad...
    makes sense for fullscreen apps only,
    but i did a test and it does help to prevent gui problems on ios

    what do you guys think of it?

  • Hi,
    I'm glad to have the confirmation that the raw code I initially posted is working even for others. Thanks for having refined it. Yes, the onresize event and triggering it from KRPano xml only for iPhone were something I would have liked to add when I could find the time.
    Thanks for your time, indexofrefraction!
    If nothing better can be found at the moment, it would be nice to have something based on innerHeight detection already embedded in the next KRPano player release.
    Klaus?

    Best,
    Hans

  • not sure it would make sense to be included in krpano
    you can also have multiple inline panoramas for example, there this code probably wouldn't be good.

    this is really only for fullscreen applications,
    and i'm not even sure if it could cause other troubles.

    it would be good to hear some opinions from others!

    anyway, i test-wise added this for my tours...
    (for iOS and Android devices)
    (in my index.html)

  • Great Klaus!
    Many thanks for such a preview! It looks awesome!

    Wouldn't it be possible to show the bottom bar even before going fullscreen? What if the page is loaded with the iPhone already in landscape mode?
    After switching to landscape mode, how could the user know how to restore the view of the button bar at the bottom (and to go fullscreen)? Will a hint be shown similarly to the arrow and the "swipe up" text in your video?

    Last question: when will 1.20 be released? I can't wait *g*
    Best,
    Hans

  • Hi,

    Wouldn't it be possible to show the bottom bar even before going fullscreen?

    You mean resizing to the currently visible space - technically it might be possible, but more tricky and complicated and far less optimal. That would require an additional layer with a fake-size to trick Safari into allowing the scrolling. And then during dragging probably resizes would be necessary to adopt size because the 'remaining-bars-down-height' is not really fix defined and could be anything. And constant resizing during dragging would be bad for performance and might result in a jerky controlling. And then the question about the pano control itself during that phase? Should it be disabled? Should it pan the pano and scroll the page at the same time...?

    I've tested and experimented a lot and I think the current solution is the best so far, it works nicely in practice and should be also easy to understand and to use.
    And if you're a talented designer you could replace that 'swipe up' texts with some animated info-graphics or something like that (e.g. image an hand-graphic making the gesture) for an even better user explanation ;-).


    What if the page is loaded with the iPhone already in landscape mode?

    No problem, the need for swipe-up gestures to get fullscreen mode will be detected anytime in any situation. That means you can anytime have the bars there or bring them there and there is then there is a possibility and information to swipe them away.


    After switching to landscape mode, how could the user know how to restore the view of the button bar at the bottom (and to go fullscreen)? Will a hint be shown similarly to the arrow and the "swipe up" text in your video?

    Sorry, I don't understand...?


    Last question: when will 1.20 be released? I can't wait *g*

    As soon as possible, I can't wait too ;-).

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!