diff --git a/web/source/keymanweb.js b/web/source/keymanweb.js index 55ce46b348..844cd328f4 100644 --- a/web/source/keymanweb.js +++ b/web/source/keymanweb.js @@ -358,7 +358,7 @@ cs.width='2px'; cs.backgroundColor='blue'; cs.border='none'; - cs.left=cs.top=0; // actual position set relative to parent when displayed + cs.left=cs.top='0px'; // actual position set relative to parent when displayed cs.display='block'; cs.visibility='hidden'; cs.zIndex='9998'; // immediately below the OSK @@ -1732,18 +1732,19 @@ */ keymanweb._GetEventObject=function(e) // I2404 - Attach to controls in IFRAMEs { - if (!e) - { + if (!e) { e = window.event; - if(!e) - { - e = keymanweb._GetLastActiveElement(); - if(e) - { - e = e.ownerDocument; - if(e) e = e.parentWindow; - if(!e) return null; - e = e.event; + if(!e) { + var elem = keymanweb._GetLastActiveElement(); + if(elem) { + elem = elem.ownerDocument; + if(elem) { + elem = elem.parentWindow; + } + if(!elem) { + return null; + } + e = elem.event; } } } @@ -3085,12 +3086,12 @@ * Javascript treats it as an object anyway * * @param {Object} Lkbd Keyboard object - * @return {Array} Copy of keyboard identification strings + * @return {Object} Copy of keyboard identification strings * */ keymanweb._GetKeyboardDetail = function(Lkbd) // I2078 - Full keyboard detail { - var Lr=[]; + var Lr={}; Lr['Name'] = Lkbd['KN']; Lr['InternalName'] = Lkbd['KI']; Lr['LanguageName'] = Lkbd['KL']; // I1300 - Add support for language names @@ -3939,7 +3940,7 @@ /** * Function removeHotKey * Scope Public - * @param {number} keycode + * @param {number} keyCode * @param {number} shiftState * Description Remove a hot key handler from array of document-level hotkeys triggered by key up event */ diff --git a/web/source/kmwbase.js b/web/source/kmwbase.js index b855bb22d9..ed296c25d2 100644 --- a/web/source/kmwbase.js +++ b/web/source/kmwbase.js @@ -104,8 +104,8 @@ var __BUILD__ = 300; }; // Generalized component event registration - util.events = []; - util.currentEvents = []; + util.events = {}; // An object mapping event names to individual event lists. Maps strings to arrays. + util.currentEvents = []; // The event messaging call stack. /** * Determine path and protocol of executing script @@ -194,7 +194,7 @@ var __BUILD__ = 300; util.callEvent = function(event,params) { if(typeof util.events[event] == 'undefined') return true; - if(typeof util.currentEvents[event] != 'undefined') return false; + if(util.currentEvents.indexOf(event) != -1) return false; // Avoid event messaging recursion! util.currentEvents.push(event); for(var i=0; i= 0; @@ -677,7 +678,7 @@ * Scope Public * @param {number} Pdn no of character to overwrite (delete) * @param {string} Ps string - * @param {numebr} Pn index + * @param {number} Pn index * @param {Object} Pelem element to output to * Description Output a character selected from the string according to the offset in the index array */ diff --git a/web/source/kmwosk.js b/web/source/kmwosk.js index 48ccb1fb3f..7d1ecff6ee 100644 --- a/web/source/kmwosk.js +++ b/web/source/kmwosk.js @@ -211,7 +211,7 @@ /** * Function enabled * Scope Public - * @return {boolean|integer} True if KMW OSK enabled + * @return {boolean|number} True if KMW OSK enabled * Description Test if KMW OSK is enabled */ osk['isEnabled'] = osk.isEnabled = function() @@ -222,7 +222,7 @@ /** * Function isVisible * Scope Public - * @return {boolean|integer} True if KMW OSK visible + * @return {boolean|number} True if KMW OSK visible * Description Test if KMW OSK is actually visible * Note that this will usually return false after any UI event that results in (temporary) loss of input focus */ @@ -1644,7 +1644,7 @@ /** * Create the OSK for a particular keyboard and device * - * @param {Array.} layout Array of OSK layout objects + * @param {Object} layout OSK layout definition * @param {string} formFactor layout form factor * @return {Object} fully formatted OSK object */ diff --git a/web/source/kmwreleasestub.js b/web/source/kmwreleasestub.js index 095306f712..e9e3a724cf 100644 --- a/web/source/kmwreleasestub.js +++ b/web/source/kmwreleasestub.js @@ -109,7 +109,7 @@ String.prototype._kmwCharCodeAt = function(codePointIndex) {}; /** * @param {string} searchValue - * @param {number} fromIndex + * @param {number} [fromIndex] * @return {number} **/ String.prototype._kmwIndexOf = function(searchValue, fromIndex) {}; diff --git a/web/source/kmwstring.js b/web/source/kmwstring.js index aa67aa13ab..45f978baf1 100644 --- a/web/source/kmwstring.js +++ b/web/source/kmwstring.js @@ -64,7 +64,7 @@ String.prototype.kmwCharCodeAt = function(codePointIndex) { * of the specified value, or -1 if not found. * * @param {string} searchValue The value to search for - * @param {number} fromIndex Optional code point index to start searching from + * @param {number} [fromIndex] Optional code point index to start searching from * @return {number} The code point index of the specified search value */ String.prototype.kmwIndexOf = function(searchValue, fromIndex) { diff --git a/web/tools/compiler.jar b/web/tools/compiler.jar index 3042ba3634..d621604551 100644 Binary files a/web/tools/compiler.jar and b/web/tools/compiler.jar differ