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

chosenbox incorrect input width calculation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.0.1
    • 9.0.0
    • Components
    • Security Level: Jimmy
    • ZK 9.0.1 S1

      Steps to Reproduce

      compare the 2 chosenboxes:

      <chosenbox width="200px"/>
      <chosenbox width="50%"/>
      

      start typing longer words into the input fields, which don't fit any more

      Current Result

      when using a pixel width the text field grows to cover the whole chosen box
      for percentage the input field grows up to 40 pixels (50-10)

      Expected Result

      correctly calculated input field size based on the actual widget width
      e.g. element.clientWidth or element.getBoundingClientRect()

      Debug Information

      the percentage value is parsed as an integer so 50% becomes 50px - 10px paddings

      https://github.com/zkoss/zkcml/blob/master/zkmax/src/archive/web/js/zkmax/inp/Chosenbox.js#L1027

      Workaround


            Leon03 Leon03
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified