Closed Bug 377305 Opened 17 years ago Closed 17 years ago

window.getSelection().focusNode is not specific enough

Categories

(Core :: DOM: Core & HTML, defect)

1.8 Branch
PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 336936

People

(Reporter: eidhof, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

When I have a form-element with three inputs, and I ask for the window.getSelection().focusNode, it is not specific enough. It always returns the form-node, where it should return the input-elements

Reproducible: Always

Steps to Reproduce:
1. Create a page with a <form> and some <input>'s in the form
2. Add window.onload javascript with an event-handler that logs the window.getSelection().focusNode on every keyup
Actual Results:  
Notice that the logged node is always the form-node

Expected Results:  
The logged node should be the specific input-node
Bug 336936 has some interesting information about why this doesn't work and how it might work in the future. This post may be of some help, too: http://www.squarefree.com/2006/05/06/finding-the-textarea-selection/.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Component: General → DOM: Level 0
Keywords: testcase
Product: Firefox → Core
Resolution: --- → DUPLICATE
Version: unspecified → 1.8 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: