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

InputWidget uses setSelectionRange instead of select in inputWidget.select()

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Minor Minor
    • 8.6.0
    • 8.5.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.6.0 S1, ZK 8.6.0 S2
    • None

      Current feature:
      zul.inp.InputWidget.select()
      https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/inp/InputWidget.js#L294

      The actual selection is performed with

      {domInputNode}

      .setSelectionRange()
      https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/inp/InputWidget.js#L300

      Since those are 1-to-1 html standard methods implemented for ZK, with some QoL differences between select and setSelectionRange (FF doesn't use the same state for these 2 methods for example), it would make sense to use the html select() as basis for zk select()
      https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
      https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select

            wenninghsu wenninghsu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: