1if (typeof(beta) == "undefined") { 2 _beta = beta = {}; 3} 4 5if (typeof(_beta.fix) == "undefined") { 6 _beta.fix = {}; 7} else { 8 //alert("keyfix is already set!"); 9} 10 11if(typeof(window.beta.instances) == "undefined") { 12 window.beta.instances = new Array(); 13} 14 15_beta.fix = function(targetId) { 16 // This fix is only for mozilla browsers 17 if(jQuery.browser.mozilla == false) { 18 return false; 19 } 20 21 var thisClass = this; 22 this.keyEventCheck = null; 23 this.db = null; 24 this.targetId = targetId; 25 window.beta.instances[this.targetId] = this; 26 27 var focusFunc = function() { 28 if (!thisClass.keyEventCheck()) { 29 thisClass.watchInput(); 30 } 31 }; 32 33 var blurFunc = function() { 34 if(thisClass.keyEventCheck) { 35 window.clearInterval(thisClass.keyEventCheck); 36 thisClass.keyEventCheck = null; 37 } 38 }; 39 40 $("#" + this.targetId).bind("focus", focusFunc); 41 $("#" + this.targetId).bind("blur", blurFunc); 42}; 43 44_beta.fix.prototype.watchInput = function() { 45 if (this.db != $("#" + this.targetId).val()) { 46 // Trigger event 47 $("#" + this.targetId).trigger("keyup"); 48 } 49 this.db = $("#" + this.targetId).val(); 50 51 if (this.keyEventCheck) { 52 window.clearInterval(this.keyEventCheck); 53 } 54 this.keyEventCheck = window.setInterval("window.beta.instances['" + this.targetId + "'].watchInput()", 100); 55};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.