summaryrefslogtreecommitdiffstats
path: root/core/js/jquery.infieldlabel.js
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-12-04 13:32:55 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-12-04 13:32:55 +0100
commite72f95f643e5d9bdb9a9293eb14bf58170fae102 (patch)
tree41efbe5443c5dd93f33cf799fc2950f7876c5fb9 /core/js/jquery.infieldlabel.js
parent3e519945c3d3ceeafb6ca302f8cf720943d397a9 (diff)
downloadnextcloud-server-e72f95f643e5d9bdb9a9293eb14bf58170fae102.tar.gz
nextcloud-server-e72f95f643e5d9bdb9a9293eb14bf58170fae102.zip
merge changes discussed in dcneiner pull number 4 'fix for autocomplete issue' including firefox password overlay
Diffstat (limited to 'core/js/jquery.infieldlabel.js')
-rw-r--r--core/js/jquery.infieldlabel.js21
1 files changed, 16 insertions, 5 deletions
diff --git a/core/js/jquery.infieldlabel.js b/core/js/jquery.infieldlabel.js
index 67608493f8a..c7daf61edd8 100644
--- a/core/js/jquery.infieldlabel.js
+++ b/core/js/jquery.infieldlabel.js
@@ -7,7 +7,7 @@
* Uses the same license as jQuery, see:
* http://docs.jquery.com/License
*
- * @version 0.1.2
+ * @version 0.1.6
*/
(function ($) {
@@ -31,10 +31,13 @@
base.options = $.extend({}, $.InFieldLabels.defaultOptions, options);
// Check if the field is already filled in
- if (base.$field.val() !== "") {
- base.$label.hide();
- base.showing = false;
- }
+ // add a short delay to handle autocomplete
+ setTimeout(function() {
+ if (base.$field.val() !== "") {
+ base.$label.hide();
+ base.showing = false;
+ }
+ }, 200);
base.$field.focus(function () {
base.fadeOnFocus();
@@ -52,7 +55,15 @@
base.checkForEmpty();
}).bind('onPropertyChange', function () {
base.checkForEmpty();
+ }).bind('keyup.infieldlabel', function () {
+ base.checkForEmpty()
});
+ setInterval(function(){
+ if(base.$field.val() != ""){
+ base.$label.hide();
+ base.showing = false;
+ };
+ },100);
};
// If the label is currently showing