Autocomplete: Check for contenteditable via isContentEditable property rather than [contenteditable] selector. Properly accounts for properties vs. attributes and 'inherit'.

This commit is contained in:
Scott González
2012-06-25 11:41:24 -04:00
parent 535ef2a01c
commit 405cbefe5c

View File

@@ -55,7 +55,7 @@ $.widget( "ui.autocomplete", {
// search term. #7799
var suppressKeyPress, suppressKeyPressRepeat, suppressInput;
this.isMultiLine = this.element.is( "textarea,[contenteditable]" );
this.isMultiLine = this.element.is( "textarea" ) || this.element.prop( "isContentEditable" );
this.valueMethod = this.element[ this.element.is( "input,textarea" ) ? "val" : "text" ];
this.isNewMenu = true;