Skip to content

Commit faefab8

Browse files
SlimFosterscottgonzalez
authored andcommitted
Resizable: Match on exact node name
Fixes #10748 Closes jquerygh-1417
1 parent c66842b commit faefab8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/resizable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ $.widget("ui.resizable", $.ui.mouse, {
104104
});
105105

106106
// Wrap the element if it cannot hold child nodes
107-
if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
107+
if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) {
108108

109109
this.element.wrap(
110110
$("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
@@ -205,7 +205,7 @@ $.widget("ui.resizable", $.ui.mouse, {
205205
this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
206206
}
207207

208-
if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
208+
if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) {
209209

210210
axis = $(this.handles[i], this.element);
211211

0 commit comments

Comments
 (0)