[Laszlo-checkins] r14111 - in openlaszlo/branches/4.4: . WEB-INF/lps/lfc/kernel/dhtml

ptw@openlaszlo.org ptw at openlaszlo.org
Wed Jun 10 13:18:14 PDT 2009


Author: ptw
Date: 2009-06-10 13:18:11 -0700 (Wed, 10 Jun 2009)
New Revision: 14111

Modified:
   openlaszlo/branches/4.4/
   openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
   openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Merged revisions 13940-13945,13947,13949,13951-13952,13954-13958,13960-13961,13963,13965-13968,13970,13972-13980,13982,13984-13985,13987-13992,13994-13995,13997-14001,14003-14011,14014-14015,14017-14020,14022-14025,14027-14032,14034,14036-14042,14044,14046,14048-14051,14053-14066,14068-14069,14071-14086,14088-14090,14092-14094,14096-14097,14099-14105,14107-14109 via svnmerge from 
http://svn.openlaszlo.org/openlaszlo/trunk

.......
  r14109 | hqm | 2009-06-10 15:38:23 -0400 (Wed, 10 Jun 2009) | 56 lines
  
  Change 20090610-hqm-6 by hqm at badtzmaru.home on 2009-06-10 15:36:44 EDT
      in /Users/hqm/openlaszlo/trunk-diamond
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: fix for "Windows DHTML edittext selection doesn't change background color of text"
  
  New Features:
  
  Bugs Fixed: LPP-8121
  
  Technical Reviewer: max
  QA Reviewer: (pending)
  Doc Reviewer: (pending)
  
  Documentation:
  
  Release Notes:
  
  Details:
  
  + See comment in LzInputTextSprite.js
  
  Added a quirk to create a (zero sized) container div with background color of white,
  which inputtext gets put in, to force the highlight color in Firefox/IE to dark blue
  
  
  
  
         // TODO [hqm 2009-06-09] LPP-8121 I discovered that if an
         // input field is contained within a div which has a white
         // background color, then it selected text will highlight with
         // a dark blue color. The div can have zero width,
         // Windows/Firefox only seems to look at the bgcolor of the
         // containing div when deciding what color to use for input
         // text highlight. So this adds an extra div, with zero width,
         // in which the actual clickable/selectable input text element
         // is placed.
  
  
  Tests:
  
  test case
  
  + in the lzmail app login window, if you type some text into the username field,
  and then select it, it should highlight in dark blue. In the app itself, any input
  field should also highlight as dark blue.
  
  + Selected text should highlight with dark blue, in Windows/Firefox3.
  If it highlights with a light or white color, that is a bug.
  
  <canvas width="100%" height="80%" bgcolor="#898989">
     <inputtext id="e1">ABCDEFGHIJKLMNOPQRSTIVWYXZ 1234567890</inputtext>
  </canvas>
.......



Property changes on: openlaszlo/branches/4.4
___________________________________________________________________
Name: svnmerge-integrated
   - /openlaszlo/branches/4.1:1-10153 /openlaszlo/branches/4.2:1-12154,12181,13205,13778 /openlaszlo/branches/devildog:1-8432 /openlaszlo/branches/pagan-deities:1-7955,8825,10756-10920,10922-10928,10930-10935,11151,11207,11554,13476,13629 /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7135,7137-7235 /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097,7872 /openlaszlo/trunk:1-13938,13940-13945,13947-13952,13954-13968,13970,13972-13980,13982-13985,13987-14015,14017-14032,14034,14036-14069,14071-14098,14106
   + /openlaszlo/branches/4.1:1-10153 /openlaszlo/branches/4.2:1-12154,12181,13205,13778 /openlaszlo/branches/devildog:1-8432 /openlaszlo/branches/pagan-deities:1-7955,8825,10756-10920,10922-10928,10930-10935,11151,11207,11554,13476,13629 /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7135,7137-7235 /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097,7872 /openlaszlo/trunk:1-13938,13940-13945,13947-13952,13954-13968,13970,13972-13980,13982-13985,13987-14015,14017-14032,14034,14036-14069,14071-14109

Modified: openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js	2009-06-10 19:44:43 UTC (rev 14110)
+++ openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js	2009-06-10 20:18:11 UTC (rev 14111)
@@ -80,8 +80,28 @@
         } else {
             this.__LZinputclickdiv.onmouseover = this.__handlemouse; 
         }
+
+    if (this.quirks.input_highlight_bug) {
+        // TODO [hqm 2009-06-09] LPP-8121 I discovered that if an
+        // input field is contained within a div which has a white
+        // background color, then it selected text will highlight with
+        // a dark blue color. The div can have zero width,
+        // Windows/Firefox only seems to look at the bgcolor of the
+        // containing div when deciding what color to use for input
+        // text highlight. So this adds an extra div, with zero width,
+        // in which the actual clickable/selectable input text element
+        // is placed.
+        var ffoxdiv = document.createElement('div');
+        ffoxdiv.style.backgroundColor = 'white';
+        ffoxdiv.style.width = '0px';
+        this.__LZclickcontainerdiv.appendChild(ffoxdiv);        
+        ffoxdiv.appendChild(this.__LZinputclickdiv);
+    } else {
         this.__LZclickcontainerdiv.appendChild(this.__LZinputclickdiv);
+    }
+
     }    
+
     this.__LZdiv.appendChild(this.__LzInputDiv);
 
     //Debug.write(this.__LzInputDiv.style);

Modified: openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2009-06-10 19:44:43 UTC (rev 14110)
+++ openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2009-06-10 20:18:11 UTC (rev 14111)
@@ -509,6 +509,8 @@
     ,clipped_scrollbar_causes_display_turd: false
     ,textgrabsinputtextfocus: false
     ,detectstuckkeys: false
+    ,input_highlight_bug: false
+
 }
 
 LzSprite.prototype.capabilities = {
@@ -688,6 +690,8 @@
             // overflow:scroll flicker when scrolling
             if (browser.OS == 'Windows') {
                 quirks['clipped_scrollbar_causes_display_turd'] = true;
+                // LPP-8121 inputtext selection highlight color depends on underlying div bgcolor
+                quirks['input_highlight_bug'] = true;
             }
             if (browser.version < 2) {
                 // see http://groups.google.ca/group/netscape.public.mozilla.dom/browse_thread/thread/821271ca11a1bdbf/46c87b49c026246f?lnk=st&q=+focus+nsIAutoCompletePopup+selectedIndex&rnum=1



More information about the Laszlo-checkins mailing list