]> source.dussan.org Git - jquery-ui.git/commitdiff
Resizable: Match on exact node name
authorAdam Foster <slimfoster@gmail.com>
Fri, 9 Jan 2015 21:55:19 +0000 (16:55 -0500)
committerScott González <scott.gonzalez@gmail.com>
Fri, 9 Jan 2015 21:56:20 +0000 (16:56 -0500)
Fixes #10748
Closes gh-1417

ui/resizable.js

index 0671fb7b50742561e807d009e3b828cde3d34adc..7eb747e76e21b506a95972bd82374b290df9c439 100644 (file)
@@ -104,7 +104,7 @@ $.widget("ui.resizable", $.ui.mouse, {
                });
 
                // Wrap the element if it cannot hold child nodes
-               if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+               if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) {
 
                        this.element.wrap(
                                $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
@@ -205,7 +205,7 @@ $.widget("ui.resizable", $.ui.mouse, {
                                        this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
                                }
 
-                               if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+                               if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) {
 
                                        axis = $(this.handles[i], this.element);