[Webkit-unassigned] [Bug 56061] New: selectionStart reports wrong caret position when the last characters are newlines

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 9 16:33:37 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=56061

           Summary: selectionStart reports wrong caret position when the
                    last characters are newlines
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rniwa at webkit.org
                CC: adele at apple.com, ap at webkit.org, tkent at chromium.org,
                    enrica at apple.com


http://crbug.com/56971

What steps will reproduce the problem?
1. Put some newlines in an empty textarea.
2. Read its selectionStart property via Javascript.

What is the expected result?
It should return the a number equal to the number of newlines.

What happens instead?
It always returns 1.

It may be a bug in Webkit, since Safari fails too. I did a reduction that shows the problem very easily:
http://martinml.com/textarea.html

This is especially annoying in a phpBB forum editor, since if you want to put some newlines and then click the button to insert a bbcode tag, it's inserted just after the last text, and not after the newlines.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list