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

chosenbox incorrect input width calculation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 9.0.0
    • Fix Version/s: 9.0.1
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 9.0.1 S1

      Description

      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


        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

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