[From nobody Thu Jun 4 11:37:41 2009 Return-Path: <laszlo-checkins-bounces@openlaszlo.org> Received: from hedwig.laszlosystems.com ([unix socket]) by hedwig.laszlosystems.com (Cyrus v2.3.9-Gentoo) with LMTPA; Wed, 03 Jun 2009 18:46:06 -0700 X-Sieve: CMU Sieve 2.3 Received: from barracuda.laszlosystems.com (barracuda.corp.laszlosystems.com [192.168.42.2]) by hedwig.laszlosystems.com (8.14.0/8.14.0) with ESMTP id n541k5HG009611; Wed, 3 Jun 2009 18:46:06 -0700 X-ASG-Debug-ID: 1244079965-052402a90000-25cLJF X-ASG-Debug-ID: 1244079965-052402a90000-25cLJF X-Barracuda-URL: http://192.168.42.2:8000/cgi-bin/mark.cgi Received: from openlaszlo.org (localhost [127.0.0.1]) by barracuda.laszlosystems.com (Spam Firewall) with ESMTP id 810DC2955; Wed, 3 Jun 2009 18:46:05 -0700 (PDT) Received: from openlaszlo.org (www.openlaszlo.org [168.75.100.7]) by barracuda.laszlosystems.com with ESMTP id NdQRNl1Dp6h02KbH; Wed, 03 Jun 2009 18:46:05 -0700 (PDT) X-ASG-Whitelist: Sender X-ASG-Whitelist: Client Received: from openlaszlo.org (openlaszlo.org [127.0.0.1]) by openlaszlo.org (8.13.4/8.13.4) with ESMTP id n541k3or009943; Wed, 3 Jun 2009 18:46:03 -0700 Received: from openlaszlo.org (openlaszlo.org [168.75.100.7]) by openlaszlo.org (8.13.4/8.13.4) with ESMTP id n541k2Pc009940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <laszlo-checkins@openlaszlo.org>; Wed, 3 Jun 2009 18:46:02 -0700 Received: (from apache@localhost) by openlaszlo.org (8.13.4/8.13.4/Submit) id n541k2uQ009939 for laszlo-checkins@openlaszlo.org; Wed, 3 Jun 2009 18:46:02 -0700 X-Barracuda-BBL-IP: 168.75.100.7 X-Barracuda-RBL-IP: 168.75.100.7 Date: Wed, 3 Jun 2009 18:46:02 -0700 From: max@openlaszlo.org Message-Id: <200906040146.n541k2uQ009939@openlaszlo.org> X-Authentication-Warning: openlaszlo.org: apache set sender to max@openlaszlo.org using -f To: laszlo-checkins@openlaszlo.org X-ASG-Orig-Subj: [Laszlo-checkins] r14052 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml Subject: [Laszlo-checkins] r14052 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml X-BeenThere: laszlo-checkins@openlaszlo.org X-Mailman-Version: 2.1.6 Precedence: list Reply-To: laszlo-dev@openlaszlo.org List-Id: OpenLaszlo checkins <laszlo-checkins.openlaszlo.org> List-Unsubscribe: <http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins>, <mailto:laszlo-checkins-request@openlaszlo.org?subject=unsubscribe> List-Archive: <http://www.openlaszlo.org/pipermail/laszlo-checkins> List-Post: <mailto:laszlo-checkins@openlaszlo.org> List-Help: <mailto:laszlo-checkins-request@openlaszlo.org?subject=help> List-Subscribe: <http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins>, <mailto:laszlo-checkins-request@openlaszlo.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: laszlo-checkins-bounces@openlaszlo.org Errors-To: laszlo-checkins-bounces@openlaszlo.org X-Barracuda-Connect: www.openlaszlo.org[168.75.100.7] X-Barracuda-Start-Time: 1244079965 X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at laszlosystems.com X-Synonym: Copied by Synonym (http://www.modulo.ro/synonym) to: mail-archive Author: max Date: 2009-06-03 18:45:59 -0700 (Wed, 03 Jun 2009) New Revision: 14052 Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js Log: Change 20090602-maxcarlson-i by maxcarlson@Bank on 2009-06-02 16:37:12 PDT in /Users/maxcarlson/openlaszlo/trunk-clean for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Fix IE to select inputtexts that share the same area as a text Bugs Fixed: LPP-8219 - IE DHTML: inputtext focus/selection issues Technical Reviewer: hminsky QA Reviewer: mdemmon Details: LzSprite - Add textgrabsinputtextfocus quirk, set to true for IE. LzInputTextSprite - __hideIfNotFocused(): Shorten lookups to LzInputTextSprite.prototype. Look at the srcElement of the last event to see if it was an instance of LzTextSprite - this happens when an text is in the same area as an inputtext. If this is the case, focus the inputtext and avoid hiding the shown inputtext. Tests: Testcase from LPP-8219 and compose window in webtop mail allows the to: field to be selected in the area that says 'Drag a contact or type for autosuggest'. Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js =================================================================== --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-06-03 10:30:06 UTC (rev 14051) +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-06-04 01:45:59 UTC (rev 14052) @@ -248,27 +248,39 @@ } LzInputTextSprite.prototype.__hideIfNotFocused = function(eventname, target) { - if (LzInputTextSprite.prototype.__lastshown == null) return; - if (LzSprite.prototype.quirks.fix_ie_clickable) { + var lzinppr = LzInputTextSprite.prototype; + if (lzinppr.__lastshown == null) return; + var quirks = LzSprite.prototype.quirks; + if (quirks.fix_ie_clickable) { if (eventname == 'onmousemove') { // track mouse position for inputtext when global clickable is false - if (LzInputTextSprite.prototype.__globalclickable == false && LzInputTextSprite.prototype.__focusedSprite && target) { - if (target.owner != LzInputTextSprite.prototype.__focusedSprite) { - LzInputTextSprite.prototype.__setglobalclickable(true); + if (lzinppr.__globalclickable == false && lzinppr.__focusedSprite && target) { + if (target.owner != lzinppr.__focusedSprite) { + lzinppr.__setglobalclickable(true); } else { - LzInputTextSprite.prototype.__setglobalclickable(false); + lzinppr.__setglobalclickable(false); } } return; - } else if (eventname != null && LzInputTextSprite.prototype.__globalclickable == true) { - LzInputTextSprite.prototype.__setglobalclickable(false); + } else if (eventname != null && lzinppr.__globalclickable == true) { + lzinppr.__setglobalclickable(false); } + if (quirks.textgrabsinputtextfocus) { + var s = window.event; + if (s && s.srcElement && s.srcElement.owner && s.srcElement.owner instanceof LzTextSprite) { + //Debug.write('text intercepting focus', eventname, s.owner instanceof LzTextSprite); + if (eventname == 'onmousedown') { + lzinppr.__lastshown.gotFocus(); + } + return; + } + } } - if (LzInputTextSprite.prototype.__focusedSprite != LzInputTextSprite.prototype.__lastshown) { - LzInputTextSprite.prototype.__lastshown.__hide(); + if (lzinppr.__focusedSprite != lzinppr.__lastshown) { + lzinppr.__lastshown.__hide(); } +} -} LzInputTextSprite.prototype.__setglobalclickable = function(c) { if (! LzSprite.prototype.quirks.fix_ie_clickable) return; if (c != LzInputTextSprite.prototype.__globalclickable) { Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js =================================================================== --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-06-03 10:30:06 UTC (rev 14051) +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-06-04 01:45:59 UTC (rev 14052) @@ -498,6 +498,7 @@ ,inputtext_anonymous_div: false ,clipped_scrollbar_causes_display_turd: false ,detectstuckkeys: false + ,textgrabsinputtextfocus: false } LzSprite.prototype.capabilities = { @@ -606,6 +607,8 @@ quirks['scrollbar_width'] = 16; // CSS sprites conflict with ie_alpha_image_loader... quirks['use_css_sprites'] = ! quirks['ie_alpha_image_loader']; + // IE needs help focusing when an lztext is in the same area - LPP-8219 + quirks['textgrabsinputtextfocus'] = true; } else if (browser.isSafari) { // Remap alt/option key also sends control since control-click shows context menu (see LPP-2584 - Lzpix: problem with multi-selecting images in Safari 2.0.4, dhtml) quirks['alt_key_sends_control'] = true; _______________________________________________ Laszlo-checkins mailing list Laszlo-checkins@openlaszlo.org http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins ]