Uploaded image for project: 'Forms'
  1. Forms
  2. FORMS-277

When the input form element has no border and its box-sizing is defined with border-box value, le width of the form element decreases its value of 2 pixels each times it is selected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.0
    • 2.0.0
    • None
    • None
    • FF, Chrome

      How to reproduce :

      • on the input form element apply this styles :
        border: 0 none; box-sizing: border-box;
      • Edit the form, select the input form element, and apply the Width to 100px.
      • clic anywhere else and select again the input form element, the width value is 98px,
      • clic anywhere else and select again the input form element, the width value is 96px,
      • clic anywhere else and select again the input form element, the width value is 94px ... etc

      The problem comes form line 1295 of /plugins/forms/resources/js/Ametys/plugins/forms/Components.js

      var width = Ext.get(input).getWidth() - 2;

      The correction :

      var width = Ext.get(input).getWidth(true);

      Be carreful that the same thing does not occurs with the height value.

            laurence Laurence Aumeunier
            llopez Laure Lopez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: