diff options
author | friendica <info@friendica.com> | 2015-01-07 14:39:07 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-07 14:39:07 -0800 |
commit | 087d6744fcd0c77cf3415b4ce6eaf50cdb63b4ef (patch) | |
tree | f731ec2ef4b1977306e18c5dc0491a84f42e423f /library | |
parent | ce953e2f41c2bf8abdda2584dd84c2bd0175f609 (diff) | |
parent | 8771dee9cf90b9c8f76c1856ea7e5107aab5840e (diff) | |
download | volse-hubzilla-087d6744fcd0c77cf3415b4ce6eaf50cdb63b4ef.tar.gz volse-hubzilla-087d6744fcd0c77cf3415b4ce6eaf50cdb63b4ef.tar.bz2 volse-hubzilla-087d6744fcd0c77cf3415b4ce6eaf50cdb63b4ef.zip |
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'library')
-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'; |