Bug 76384 - Web Inspector: setCurrentFocusElement should not update selection when focus is moved to text field or text area.
Summary: Web Inspector: setCurrentFocusElement should not update selection when focus ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Vsevolod Vlasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 08:19 PST by Vsevolod Vlasov
Modified: 2012-01-16 08:57 PST (History)
11 users (show)

See Also:


Attachments
Patch (3.70 KB, patch)
2012-01-16 08:26 PST, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Final patch chunk, v1 (713.98 KB, patch)
2012-01-16 08:54 PST, Nikolas Zimmermann
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vsevolod Vlasov 2012-01-16 08:19:12 PST
setCurrentFocusElement should not update selection when focus is moved to text field or text area.
In these cases focus is correctly updated automatically.
Comment 1 Vsevolod Vlasov 2012-01-16 08:26:04 PST
Created attachment 122643 [details]
Patch
Comment 2 Timothy Hatcher 2012-01-16 08:31:51 PST
Comment on attachment 122643 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=122643&action=review

> Source/WebCore/inspector/front-end/UIUtils.js:597
> +    const textInputTypes = ["text", "search", "tel", "url", "email", "password"]; 
> +    if (element instanceof HTMLInputElement)
> +        return textInputTypes.indexOf(element.type) !== -1;

A faster way to do this would be:

outside function:
WebInspector._textInputTypes = ["text", "search", "tel", "url", "email", "password"].keySet();

inside function:
if (element instanceof HTMLInputElement)
     return element.type in WebInspector._textInputTypes;
Comment 3 Vsevolod Vlasov 2012-01-16 08:47:40 PST
Committed r105066: <http://trac.webkit.org/changeset/105066>
Comment 4 Nikolas Zimmermann 2012-01-16 08:54:47 PST
Reopening to attach new patch.
Comment 5 Nikolas Zimmermann 2012-01-16 08:54:59 PST
Created attachment 122646 [details]
Final patch chunk, v1
Comment 6 Nikolas Zimmermann 2012-01-16 08:56:44 PST
Comment on attachment 122646 [details]
Final patch chunk, v1

Oops, webkit-patch got confused, it uploaded the patch to the wrong br. Please ignore this.
Comment 7 Vsevolod Vlasov 2012-01-16 08:57:53 PST
Marking as fixed again.