PopOver On Mobile -- Orientation Change Bug?

2 posts, 0 answers
  1. Rob
    Rob avatar
    4 posts
    Member since:
    Jul 2012

    Posted 28 Oct 2014 Link to this post

    Hi, I am using the Popover control on a web app which is intended to be cross-platform from desktop to tablet.  On tablet devices, if a popover is open when the device orientation changes, the popover does not relocate itself to the correct relative position.  See this jsbin from an iPad for an example:


    Can this be fixed, or is there a workaround known to work well?
  2. Petyo
    Petyo avatar
    2444 posts

    Posted 30 Oct 2014 Link to this post

    Hello Rob,

    the mobile popover (like all Kendo UI popups) should close when orientation changes or scrolling occurs. In general, it would be great if the popups could re-position themselves in these cases, but in practice this implementation is quite complex and we haven't done that yet. For some reason, the orientation change does not always close the popover, though. 

    The simplest workaround I can come up with is the following:

    window.addEventListener("orientationchange", function() {
        var popover = $('[data-role=popover]').data('kendoMobilePopOver');
          if (popover) {
    }, false);

    This reliably closes the popover when the orientation changes, at least in my tests. 

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top