History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5450
Type: Bug Bug
Status: RetestBranch RetestBranch
Resolution: Fixed
Priority: P0 P0
Assignee: Unassigned
Reporter: Pablo Kang
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Cursor position moves when clicking on inputtext containing text longer than its width

Created: 19/Feb/08 04:48 PM   Updated: 27/Mar/08 01:36 PM
Component/s: LFC - Text
Affects Version/s: Freya, RingDing (4.1)
Fix Version/s: Mars, RingDing (4.1)

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 8,312
Runtime: N/A
Fix in hand: False


 Description  « Hide
Test case:
<canvas debug="true">

    <!-- Click on the canvas and then click on the inputtext. Note that the
         cursor moves unexpectedly. -->
    <inputtext x="20" y="20" bgcolor="gray" width="200">
        <handler name="oninit">
            var text = "a b c d e f g h i j k l m n o p q r s t u v w x y z";
            this.setText(text);
            this.setSelection(text.length);
        </handler>
    </inputtext>

</canvas>

Steps:
1. Click on the canvas; you have to make sure that the inputtext doesn't have the focus.
2. Position your cursor right of the letter "y" and mouse down.

Expected:
Cursor should be next to the letter "y".

Actual:
The cursor is placed next to the letter "p".

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Max Carlson - 20/Feb/08 10:03 AM
Is this actually a regression? It reproduces for me in wafflecone also.

Pablo Kang - 20/Feb/08 12:32 PM
May not be a regression, but it's a real annoying bug nonetheless. Am I supposed mark "Affects version/s" differently so we're not just checking against a previous release?

I've been to other Flash sites that have input text boxes and don't see the bug happening there.

Amy Muntz - 05/Mar/08 06:24 PM
Please evaluate the risk of doing this for Mars.

Max Carlson - 14/Mar/08 09:53 AM
The trouble is, I haven't been able to come up with a fix or workaround for this one. I'll keep trying!

Max Carlson - 17/Mar/08 05:48 PM
Author: max
Date: 2008-03-17 18:47:45 -0700 (Mon, 17 Mar 2008)
New Revision: 8297

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
Log:
Change 20080314-maxcarlson-L by maxcarlson@Roboto on 2008-03-14 12:54:25 PDT
    in /Users/maxcarlson/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Reset both horizontal and vertical scrolling after setFocus()

New Features:

Bugs Fixed: LPP-5450 - Cursor position moves when clicking on inputtext containing text longer than its width

Technical Reviewer: promanik
QA Reviewer: pkang@laszlosystems.com
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: Reset scrolling after setFocus()
    

Tests: See LPP-5450.



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2008-03-17 18:01:35 UTC (rev 8296)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2008-03-18 01:47:45 UTC (rev 8297)
@@ -189,14 +189,15 @@
 LzInputTextSprite.prototype.select = function ( ){
     var sf = targetPath(this.__LZtextclip);
 
- // calling setFocus() seems to bash the scroll value, so save it
+ // calling setFocus() bashes the scroll and hscroll values, so save them
     var myscroll = this.__LZtextclip.scroll;
+ var myhscroll = this.__LZtextclip.hscroll;
     if( Selection.getFocus() != sf ) {
         Selection.setFocus( sf );
     }
- this.__LZtextclip.hscroll = 0;
- // restore the scroll value
+ // restore the scroll and hscroll values
     this.__LZtextclip.scroll = myscroll;
+ this.__LZtextclip.hscroll = myhscroll;
     this.__LZtextclip.background = false;
 }
 


_______________________________________________
Laszlo-checkins mailing list
Laszlo-checkins@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Mamye Kratt - 27/Mar/08 01:36 PM
(pagan-deities branch build r8434 - mars rc/4.0.11)

Cursor stays at the "y" now

Mamye Kratt - 27/Mar/08 01:36 PM
test trunk4/ringding.