From 28ea5182578b36b6dcb1df131c5d7258577c6736 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Sat, 27 Jul 2013 10:02:27 -0700 Subject: [PATCH] width: copy option needs to ignore min-width and max-width. fixes #1557 --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 1bbbd17b..1d831c65 100644 --- a/select2.js +++ b/select2.js @@ -1739,7 +1739,7 @@ the specific language governing permissions and limitations under the Apache Lic attrs = style.split(';'); for (i = 0, l = attrs.length; i < l; i = i + 1) { matches = attrs[i].replace(/\s/g, '') - .match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i); + .match(/[^-]width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i); if (matches !== null && matches.length >= 1) return matches[1]; }