New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text Area Component allows input of negative value in the Rows field #1555
Labels
Comments
Thank you @breagol37 for your report. This patch will treat rows in the same way as maxlength. The function utils.forceNumber() is only used by the maxlength field and really is a force string to positive integer, I'll make a note to update that function signature diff --git a/src/js/form-builder.js b/src/js/form-builder.js
index 1761fdf..120f403 100644
--- a/src/js/form-builder.js
+++ b/src/js/form-builder.js
@@ -1817,7 +1817,7 @@ function FormBuilder(opts, element, $) {
}
})
- $stage.on('blur', 'input.fld-maxlength', e => {
+ $stage.on('blur', 'input.fld-maxlength, input.fld-rows', e => {
e.target.value = forceNumber(e.target.value)
})
diff --git a/src/sass/_stage.scss b/src/sass/_stage.scss
index abe31b2..382560f 100644
--- a/src/sass/_stage.scss
+++ b/src/sass/_stage.scss
@@ -656,7 +656,7 @@
border: 1px solid $error;
}
- &.fld-maxlength {
+ &.fld-maxlength, &.fld-rows {
width: 75px;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
When editing the Text Area component's Rows field will allow you to input negative values.
Environment Details:
Expected Behavior
The negative should be removed as the same behaviour in the Max Length field
Actual Behavior
Negative does not get removed
Steps to Reproduce
The text was updated successfully, but these errors were encountered: