1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Better regex for parsing config select width placeholder style

This commit is contained in:
Nick O'Leary 2021-09-29 19:12:13 +01:00
parent 9ccffee82c
commit 0cbf4ac37d
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -250,8 +250,8 @@ RED.editor = (function() {
var newWidth = input.width();
var attrStyle = input.attr('style');
var m;
if ((m = /width\s*:\s*([^;]+)/i.exec(attrStyle)) !== null) {
newWidth = m[1].trim();
if ((m = /(^|\s|;)width\s*:\s*([^;]+)/i.exec(attrStyle)) !== null) {
newWidth = m[2].trim();
} else {
newWidth = "70%";
}