[Webkit-unassigned] [Bug 7275] window.getSelection() doesn't work in textareas

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Wed Feb 15 12:17:41 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=7275


ap at nypop.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|JavaScript                  |HTML DOM
     Ever Confirmed|0                           |1




------- Comment #1 from ap at nypop.com  2006-02-15 12:17 PDT -------
Confirming as a difference between Firefox and WebKit, but I am not sure what
the correct approach would be.

In Firefox, window.getSelection() returns a collapsed range positioned before
the TEXTAREA (HTMLBodyElement, offset 22 in your example). This doesn't look
right to me - that is an entirely different position, and the insertion point
can easily be moved there in contenteditable mode.

TEXTAREA has a child text node - perhaps it would be more appropriate to make
window.getSelection() return the actual range within this text node?

BTW, you can probably use onfocus/onblur handlers to track the last focused
textarea.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list