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:
parent
9ccffee82c
commit
0cbf4ac37d
@ -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%";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user