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

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

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 8.5.2
    • Fix Version/s: 8.6.0
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.6.0 S1, ZK 8.6.0 S2

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: