Combobox upper/lowercase to selected item trigger too late before onChange

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 8.6.1
    • Affects Version/s: 8.6.0
    • Component/s: None
    • Security Level: Jimmy
    • None
    • ZK 8.6.1 S1
    • None

      Steps to Reproduce

      http://zkfiddle.org/sample/31g33oj/1-combobox-case-before-select

      Run fiddle
      In the combobox type "-abc" (dash character, then lowercase string)
      use keyboard arrow to move the carret (selection cursor) to 1st position, then use del to remove the dash.
      tab out or click out to trigger blur

      Current Result

      During blur > onChange, the onChange event is sent first (with the original abc value)
      Then, highlight triggers and format the string to uppercase
      on server side, the org.zkoss.zul.Combobox.syncValueToSelection() tries to match comboitems to the string lowercase abc

      Expected Result

      Highlight should trigger first, and the value sent to the server for org.zkoss.zul.Combobox.syncValueToSelection() should be uppercase ABC

      Debug Info

      Root Cause

      Workaround

      <script><![CDATA[  
      	zk.afterLoad('zul.inp', function() {
      		var xCombobox = {};
      		zk.override(zul.inp.Combobox.prototype, xCombobox ,{
      			updateChange_ : function() {
      				this._hilite({sendOnSelect: true, noSelectRange: true});
      				var result = xCombobox.updateChange_.apply(this, arguments);
      				return result;
      			}
      		});//zk.override
      	});//zk.afterLoad
      	]]></script>
      

            Assignee:
            rudyhuang
            Reporter:
            MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h