[Webkit-unassigned] [Bug 73762] New: Selecting text by double-clicking a word gives incorrect start/end offsets to javascript

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 3 21:35:59 PST 2011


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

           Summary: Selecting text by double-clicking a word gives
                    incorrect start/end offsets to javascript
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: kellypmk at gmail.com


Summary:

Using javascript, it is possible to determine the current text selection on a page by calling window.getSelection(). This contains the fields baseNode, baseOffset, endNode, and endOffset representing the start and end of the selection. When text is selected by pressing the mouse button and dragging, these offsets are set correctly. When double-clicking a word, the start and end offset are incorrect - they are equal to the same value, which is part-way through the word.

Steps to Reproduce:

Open the attacked file in Safari. Double-click on the word "some", then click "Show selection"

Expected Results:

The dialog should show the following:

baseNode = [object Text]
baseOffset = 8
extentNode = [object Text]
extentOffset = 12

Actual Results:

The dialog shows the following:

baseNode = [object Text]
baseOffset = 11
extentNode = [object Text]
extentOffset = 11

Regression:

Notes:

This problem occurs in both Safari 5.1.2 (7534.52.7) and Chrome 15.0.874.121. I am running Mac OS X 10.7.2.

-- 
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