Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    "orientationChange" event not thrown in Google Chrome

    Hi,

    I have recently found that the "orientationChange" event is not being thrown in Google Chrome.
    There is no problem with other browsers such as IE, Firefox of Safari.
    There is also no problem on the default Internet browser on my Galaxy Tab, which I think is a version of either Chrome or Chromium.

    I have used the following code snippet to test, simply pasting it into the "Hello World" demo page:

    isc.Page.setEvent("orientationChange", "isc.say('orientationChange')");

    I'm quite certain that the event was being triggered in Chrome last year when I wrote some code to change a layout in response to an orientation change, so I'm guessing that Google have changed something since then.

    Could you please have a look?


    Andrew.


    SmartClient versions
    SmartClient_v101p_2016-04-25_Pro
    SmartClient_v110p_2016-04-18_Pro

    Google Chrome versions
    Windows: Version 50.0.2661.87 m (on Windows 10, 64 bit)
    Linux: Version 50.0.2661.87 m (on Arch Linux, x86_64)
    Android: Version 49.0.2623.105 (on Galaxy Tab 4 with Android 5.02)

    #2
    Why are you reporting this for Windows and Linux? When would you expect orientationChange to fire on those platforms?

    For Android, you are reporting this for a separately installed instance of Chrome, right? What version is that?

    Comment


      #3
      I'm not concerned about whether or not the event fires on desktop browsers. I have simply observed that it does fire on desktop browsers other than recent versions of Chrome and my intention was only to provide some evidence that this is a chrome-specific issue.

      Yes, this is the version of Chrome from the Android play store.

      This morning, the Android version of Chrome I was using was 49.0.2623.105.
      A few hours ago the device notified me of various updates including one for Chrome.
      I'm now running Chrome version 50.0.2661.89.

      It shows the same behavior as Chrome 49.

      Comment


        #4
        We were not able to reproduce the problem on actual devices with Chrome installed. We've tested on Android 4.4.2 and 5.1 with Chrome 49.0.2623.105.

        Regards
        Isomorphic Software

        Comment


          #5
          Well, I don't know what's going on then.

          I have a workaround that works for me: I replace
          Code:
          isc.Page.setEvent('orientationChange', myFunction)
          with
          Code:
          window.addEventListener("orientationchange", myFunction)
          and everything works as expected.

          Thanks for looking into it anyway.

          Andrew

          Comment

          Working...
          X