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

Multiple onAnchorPos events causing too many parameters exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Normal
    • 7.0.3
    • 7.0.0, 7.0.1, 7.0.2
    • General
    • Security Level: Jimmy
    • Ubuntu
      Firefox 23

    Description

      Although onAnchorPos event would not fire if the anchor position stayed the same as the last time it fired, multiple onAnchorPos events were fired when anchor top alternates between an integer value (638) and a fractional value (638.400...). This behavior causes the number of request parameter to exceed the maximum value of 100. Please see the server log posted on http://forum.zkoss.org/question/92611/illegalstateexception-too-many-parameters-error/.

      The first few entries of the parameter list read as follows.

      cmd_0=onAnchorPos
      uuid_0=1Y4Qe1
      data_0=

      {"top":638,"left":22}

      cmd_1=onAnchorPos
      uuid_1=1Y4Qe1
      data_1=

      {"top":638.4000244140625,"left":22}

      cmd_2=onAnchorPos
      uuid_2=1Y4Qe1
      data_2=

      {"top":638,"left":22}

      cmd_3=onAnchorPos
      uuid_3=1Y4Qe1
      data_3=

      {"top":638.4000244140625,"left":22}

      ...

      Reproducing Sample:

      test.zul
      <zk>    
          <zscript><![CDATA[
          ListModelList model = new ListModelList(Locale.getAvailableLocales());
          for (int i = 0; i < 10; i++)
              model.addAll(model);
          ]]></zscript>
          <listbox model="${model}" height="300px">
              <custom-attributes org.zkoss.zul.listbox.rod="true"></custom-attributes>
          </listbox>
      </zk>
      

      Reproducing steps:

      1. Select a listitem
      2. Scroll down until rod kicked in
      3. Scroll up and down rapidly while rod is still loading data
      4. Click a few times at random position inside listbox while rod is still loading data
      5. Observe in network tab of browser's developer tool
      -> look for large post body and it would contain many onAnchorPos events with similar anchor positions

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: