Skip to content

Commit 28ea518

Browse files
committed
width: copy option needs to ignore min-width and max-width. fixes select2#1557
1 parent f886f71 commit 28ea518

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1739,7 +1739,7 @@ the specific language governing permissions and limitations under the Apache Lic
17391739
attrs = style.split(';');
17401740
for (i = 0, l = attrs.length; i < l; i = i + 1) {
17411741
matches = attrs[i].replace(/\s/g, '')
1742-
.match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);
1742+
.match(/[^-]width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);
17431743
if (matches !== null && matches.length >= 1)
17441744
return matches[1];
17451745
}

0 commit comments

Comments
 (0)