diff options
author | friendica <info@friendica.com> | 2015-01-07 14:39:09 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-07 14:39:09 -0800 |
commit | 0657195125675700eeb9bcd1bc92f4299cac0304 (patch) | |
tree | 2e6d2df8fd42b289b947a16f0c5f0009a2c98043 /library/jquery-textcomplete/jquery.textcomplete.js | |
parent | a1e5a661fa8f87793cab0fe9c34f507dafb65d99 (diff) | |
parent | 087d6744fcd0c77cf3415b4ce6eaf50cdb63b4ef (diff) | |
download | volse-hubzilla-0657195125675700eeb9bcd1bc92f4299cac0304.tar.gz volse-hubzilla-0657195125675700eeb9bcd1bc92f4299cac0304.tar.bz2 volse-hubzilla-0657195125675700eeb9bcd1bc92f4299cac0304.zip |
Merge branch 'master' into trinidad
Diffstat (limited to 'library/jquery-textcomplete/jquery.textcomplete.js')
-rw-r--r-- | library/jquery-textcomplete/jquery.textcomplete.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/library/jquery-textcomplete/jquery.textcomplete.js b/library/jquery-textcomplete/jquery.textcomplete.js index 1e61683ea..c8303eaa0 100644 --- a/library/jquery-textcomplete/jquery.textcomplete.js +++ b/library/jquery-textcomplete/jquery.textcomplete.js @@ -124,8 +124,9 @@ if (typeof jQuery === 'undefined') { this.views = []; this.option = $.extend({}, Completer._getDefaults(), option); - if (!this.$el.is('textarea') && !element.isContentEditable && element.contentEditable != 'true') { - throw new Error('textcomplete must be called on a Textarea or a ContentEditable.'); + + if (!this.$el.is('input[type=text]') && !this.$el.is('textarea') && !element.isContentEditable && element.contentEditable != 'true') { + throw new Error('textcomplete must be called on a input[type=text], Textarea or a ContentEditable.'); } if (element === document.activeElement) { @@ -171,7 +172,7 @@ if (typeof jQuery === 'undefined') { if (this.option.adapter) { Adapter = this.option.adapter; } else { - if (this.$el.is('textarea')) { + if (this.$el.is('textarea') || this.$el.is('input[type=text]')) { viewName = typeof element.selectionEnd === 'number' ? 'Textarea' : 'IETextarea'; } else { viewName = 'ContentEditable'; |