WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
7128
Programmatically setting a selection inside an editable region shouldn't focus that region
https://bugs.webkit.org/show_bug.cgi?id=7128
Summary
Programmatically setting a selection inside an editable region shouldn't focu...
Justin Garcia
Reported
2006-02-07 02:14:15 PST
There are two arguments for not focusing an editable region when a selection is programmatically set inside it: Focusing a node scrolls to reveal it, and we don't normally scroll to reveal a selection when it is set. We don't focus textareas when we set selections inside them (FireFox doesn't either) IE focuses textareas when a selection is set inside them, but it _does not_ focus an editable region when a selection is set inside it.
Attachments
Add attachment
proposed patch, testcase, etc.
Adele Peterson
Comment 1
2006-03-07 18:06:56 PST
Adele told me that the first problem I mentioned in the description isn't true. Programmatically setting a selection inside a contenteditable region will focus that region, but WebCore won't scroll to reveal it, b/c setFocusNode() doesn't scrollToReveal focus() does. Another reason why we don't want to focus the contenteditable region is that setFocusNode clears the selection, and that will clear the selection that was just set programmatically.
Ahmad Saleem
Comment 2
2022-12-16 16:31:43 PST
Is it something still valid or we want to focus? Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug