Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3618

onClick listener doesn't work on iPad

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 8.5.0
    • 8.0.4.2
    • None
    • Security Level: Jimmy
    • None

    Description

      Steps to Reproduce

      <image src="/image/X.png" height="100px" width="200px" onClick="self.detach()"/>
      
      1. load the zul above with iPad
        iPad 3(The New iPad), iOS 6.1.3, safari
        iPad Air, iOS 10.0.2, safari/ chrome
        iPad, iOS 5, safari
      2. click the image

      Current Result

      no effect, the image still exists

      Expected Result

      ZK invokes the onClick listener.

      Debug Info

      1. chrome device simulator can't reproduce it
      2. a button's listener works correctly. But other components without cursor:pointer have this issue, so it affects lots of components.
      3. 8.0.4.2 CE doesn't have such issue. only EE has this issue.
      4. register the touchstart event (https://developer.mozilla.org/en-US/docs/Web/Events/touchstart) instead of click event might solve this problem in an architectural way.

      Root cause

      an iPad safari bug, No event bubbling without a cursor style, ref: http://www.shdon.com/blog/2013/06/07/why-your-click-events-don-t-work-on-mobile-safari

      Workaround

      • .z-image { cursor: pointer }

      Attachments

        Issue Links

          Activity

            People

              DevChu DevChu
              hawk hawk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h