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

Unnecessary multiple _hliteOpt function callings in Chosenbox when filtering item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • None
    • 6.5.8.1
    • Components

      Steps to Reproduce

      Run the following zul.

      <zk>
      	<script><![CDATA[
      		zk.afterMount(function() {
      			var _xChosenbox = {};
      			zk.override(zkmax.inp.Chosenbox.prototype, _xChosenbox, {
      				_hliteOpt: function (target, highlight) {
      					_xChosenbox._hliteOpt.apply(this, arguments);
      					zk.log('<_hliteOpt>' + (target ? target.id : 'no target') + ', highlight: ' + highlight);
      				}
      			});
      		});
      	]]></script>
      	<zscript><![CDATA[
              ListModelList model = new ListModelList(new String[] {
                  "aaa1", "aaa2", "aaa3", "bbb4", "bbb5", "bbb6", "ccc7", "ccc8", "ccc9"});
          ]]></zscript>
      	<chosenbox width="500px" model="${model}"/>
      </zk>
      

      type b to filter, and press arrow up/down.

      Current Result

      lots of _hliteOpt function callings

      Expected Result

      only one _hliteOpt function call

      Debug Information


      Workaround


            DevChu DevChu
            DevChu DevChu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: