]> 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>
Mon, 9 Feb 2015 16:58:13 +0000 (11:58 -0500)
Fixes #10748
Closes gh-1417
(cherry picked from commit faefab842bc79f212ccee227b7a37c7630b1573c)

ui/resizable.js

index 394e484b3b7959f4c79266f70f7b104594309cf2..8ec986f4fe50818f5dde3db6eec63128fe6c3f89 100644 (file)
@@ -99,7 +99,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({
@@ -200,7 +200,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);