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

clicking menuitem fires 2 onClick events in mobile browser

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 10.1.0
    • 10.0.0
    • None
    • Security Level: Jimmy

      Steps to Reproduce

      1. visit the zul with debug-js = false in zk.xml
      2. click the menuitem with mobile browser

      Current Result

      • see it prints 2 lines of log
      • check ajax request payload, it contains 2 onClick command

      Expected Result

      send 1 onClick command

      Debug Information

      • if debug-js=true, the bug doesn't happen
      • call stacks are different in 2 cases, this.$super() calls different parent widgets

      mobile && debug-js=false

      call stack:

      zul.menu.Menuitem.prototype.doClick_() in menuite.ts
      this.$super('doClick_', evt, true);
      zul.menu.Menuitem.doClick_() in menuitem-touch.ts
      

      mobile && debug-js=true

      call stack:

      Widget.prototype.doClick_() 
      this.$super('doClick_', evt, true);
      zul.menu.Menuitem.doClick_() in menuitem-touch.ts
      

      potential problem

      need to find the root cause of the different behavior between compressed and uncompressed js and solve it because it might affect multiple widgets

      Workaround

      zk-5743.js

        1. zk-5743.zul
          0.2 kB
        2. zk-5743.js
          3 kB
        3. zk-5743.zip
          16 kB

            jumperchen jumperchen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: