[Laszlo-dev] [Laszlo-checkins] r14749 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml

Max Carlson max at openlaszlo.org
Fri Sep 11 22:18:44 PDT 2009


I'm checking this in ahead of review because it seems safe and makes IE 
inputtexts work properly again...

max at openlaszlo.org wrote:
> Author: max
> Date: 2009-09-11 22:17:13 -0700 (Fri, 11 Sep 2009)
> New Revision: 14749
> 
> Modified:
>    openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js
>    openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
> Log:
> Change 20090911-maxcarlson-g by maxcarlson at bank on 2009-09-11 22:01:32 PDT
>     in /Users/maxcarlson/openlaszlo/trunk-clean
>     for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: Fix inputtext regression in IE DHTML
> 
> Bugs Fixed: LPP-8441 - Wrong cursor for inputtext in IE
> 
> Technical Reviewer: hminsky
> QA Reviewer: ptw
> 
> Details: It turns out it's no longer necessary to try to use the container div to receive mouse activation events...  
> 
> LzSprite - go back to using the canvas div instead, storing as LzSprite.__mouseActivationDiv so it can be accessed elsewhere.
> 
> LzKeyboardKernel - Use LzSprite.__mouseActivationDiv.
> 
> Tests: See LPP-8441, amazon searchbox, weather search box and webtop compose window subject fields in IE 7 DHTML.  LPP-8421 no longer an issue in Firefox 3.5.3 OS X and IE 7.
> 
> 
> 
> Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js
> ===================================================================
> --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js	2009-09-12 05:16:36 UTC (rev 14748)
> +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js	2009-09-12 05:17:13 UTC (rev 14749)
> @@ -190,18 +190,18 @@
>      }
>      // Called by lz.Keys when the last focusable element was reached.
>      ,gotLastFocus: function () {
> -        //console.log('gotLastFocus', LzSprite.__rootSpriteContainer.mouseisover);
> -        if (!  LzSprite.__rootSpriteContainer.mouseisover) LzKeyboardKernel.setKeyboardControl(false);
> +        //console.log('gotLastFocus', LzSprite.__mouseActivationDiv.mouseisover);
> +        if (!  LzSprite.__mouseActivationDiv.mouseisover) LzKeyboardKernel.setKeyboardControl(false);
>      }
>      // Called to turn on/off restriction of focus to this application
>      ,setGlobalFocusTrap: function (istrapped) {
>          LzKeyboardKernel.__lockFocus = istrapped;
>          if (LzSprite.quirks.activate_on_mouseover) {
> -            var rootcontainer = LzSprite.__rootSpriteContainer;
> +            var activationdiv = LzSprite.__mouseActivationDiv;
>              if (istrapped) {
> -                rootcontainer.onmouseover();
> +                activationdiv.onmouseover();
>              } else {
> -                rootcontainer.onmouseout();
> +                activationdiv.onmouseout();
>              }
>          }
>      }
> 
> Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
> ===================================================================
> --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2009-09-12 05:16:36 UTC (rev 14748)
> +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2009-09-12 05:17:13 UTC (rev 14749)
> @@ -112,8 +112,8 @@
>  
>          if (quirks.activate_on_mouseover) {
>              // Mouse detection for activation/deactivation of keyboard/mouse events
> -            rootcontainer.mouseisover = false;
> -            rootcontainer.onmouseover = function(e) {
> +            div.mouseisover = false;
> +            div.onmouseover = function(e) {
>                  if (LzSprite.quirks.focus_on_mouseover) {
>                      if (LzSprite.prototype.getSelectedText() == "") {
>                          div.focus();
> @@ -124,7 +124,7 @@
>                  this.mouseisover = true;
>                  //console.log('onmouseover', e, this.mouseisover);
>              }
> -            rootcontainer.onmouseout = function(e) {
> +            div.onmouseout = function(e) {
>                  if (! e) {
>                      e = window.event;
>                      var el = e.toElement;
> @@ -209,6 +209,9 @@
>                  }
>                  //Debug.write('onmouseout', this.mouseisover, el.className, e);
>              }
> +
> +            // Store a reference to the div that handles mouse activation
> +            LzSprite.__mouseActivationDiv = div;
>          }
>  
>      } else {
> @@ -1428,10 +1431,10 @@
>          LzMouseKernel.__lastMouseOver = this;
>  
>          if (this.quirks.activate_on_mouseover) {
> -            var rootcontainer = LzSprite.__rootSpriteContainer;
> -            if (! rootcontainer.mouseisover) {
> +            var activationdiv = LzSprite.__mouseActivationDiv;
> +            if (! activationdiv.mouseisover) {
>                  // enable keyboard/mouse events
> -                rootcontainer.onmouseover();
> +                activationdiv.onmouseover();
>              }
>          }
>      }
> 
> 
> _______________________________________________
> Laszlo-checkins mailing list
> Laszlo-checkins at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

-- 
Regards,
Max Carlson
OpenLaszlo.org


More information about the Laszlo-dev mailing list