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

Dropdown list inside a grid automatically closes when moused out [FF]

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: 7.0.0, 7.0.1, 7.0.2
    • Fix Version/s: None
    • Component/s: General
    • Security Level: Jimmy
    • Labels:

      Description

      The issue seemed to appear in Firefox, and not in Chrome.

      1. Open the dropdown list
      2. Move the mouse cursor outside the dropdown list

      The dropdown list would automatically close, and appear to select something, but does not.

      test.zul
      <grid>
          <columns>
              <column />
          </columns>
          <rows>
              <row>
                  <listbox mold="select" onSelect='alert("onSelect fired");'>
                      <listitem><listcell label="1" /></listitem>
                      <listitem><listcell label="2" /></listitem>
                      <listitem><listcell label="3" /></listitem>
                      <listitem><listcell label="4" /></listitem>
                      <listitem><listcell label="5" /></listitem>
                  </listbox>
              </row>
          </rows>
      </grid>
      

      A workaround is to apply the following script to the listbox.

      Workaround
      <grid xmlns:w="client">
          ...
                  <listbox mold="select">
                  <attribute w:name="onBind"><![CDATA[
                  if (zk.ff && this.desktop) {
                      var n = this.$n(),
                          p = n.parentNode, $p;
                      if (p) {
                          $p = jq(p);
                      }
                      
                      while ($p) {
                          if ($p.hasClass('z-row-inner')) {
                              $p.removeClass('z-row-inner');
                              break;
                          }
                          $p = $p.parent();
                      }
                  }]]></attribute>
                  ...
                  </listbox>
          ...
      </grid>
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jumperchen jumperchen
              Reporter:
              neillee neillee
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: