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

rightclick event on listitem component also fires a click event on safari and google chrome

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Normal Normal
    • None
    • 6.5.1
    • Components
    • tested with safari (6.0.2 on OSX 10.7.5, zk.browser:webkit 536.26), chorme (24.0.1312.57 on OSX 10.7.5, zk.browser: webkit 537.17)

      I'm using zk framework 6.5.1.1 and I have a strange issue on listitem with both click and right click events: I'm working on OSX and the right click event also fire a click event under some conditions.

      I created a testcase: in safari and chrome if you rightclick on element 2,3 you can see two popup opening, but on the same application with other browser works fine, also in google chrome running on windows platform

      <window title="bug_event_chrome_osx" border="normal" height="100%" width="100%">

      <popup id="left_pop">
      <label value="LEFT!"></label>
      </popup>

      <popup id="right_pop" >
      <label value="RIGHT!" width="200px" style="background-color:red;"></label>
      </popup>

      <zscript>

      void left_b(){
      org.zkoss.zul.Messagebox.show("left");
      }
      void right_b() {
      org.zkoss.zul.Messagebox.show("right");
      }

      void left_p(org.zkoss.zk.ui.Component c){
      left_pop.open(container,"bottom_left");
      }
      void right_p(org.zkoss.zk.ui.Component c){
      right_pop.open(container,"bottom_right");
      }

      </zscript>

      <vlayout id="container" hflex="1" vflex="1">
      <listbox hflex="1" vflex="1">

      <listitem
      onRightClick="right_b()"
      onClick="left_b()"
      label=" 1 - click and right click me! sometimes seems working fine, but often right click also fire click event, try to move messageboxes"
      />

      <listitem
      onRightClick="right_p(self)"
      onClick="left_p(self)"
      label=" 2 - click and right click me! sometimes seems working fine, but often a right click also fires a click event, try to move messageboxes"
      />

      <listitem
      onRightClick='right_pop.open(container,"top_right");'
      onClick='left_pop.open(container,"top_left");'
      label=" 3 - click and right click me! in chrome and safari (osx) on right click event also fires a click event"
      />
      </listbox>
      </vlayout>

      </window>

            jumperchen jumperchen
            developer01 developer01
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: