Bug 86202

Summary: Web Inspector: Can't type spaces in "Override User Agent" field
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch yurys: review+

Description Alexander Pavlov (apavlov) 2012-05-11 05:51:19 PDT
What steps will reproduce the problem?
1. On any web page, open the developer tools (either from "View", "Developer" or by pressing Command+Option+J).
2. Click the gear icon in the lower right corner of the window.
3. Check the checkbox near where it says "Override User Agent".
4. Pick "Other..." from the dropdown menu to enter your own user agent string.
5. Try to type "Mozilla/5.0 (whatever)".

What is the expected result?
I should be able to enter the user agent string I am trying to type.

What happens instead?
Pressing the space bar closes the settings popup.

Please provide any additional information below. Attach a screenshot if
possible.
I am able to work around the problem by copying a space and pasting it into the text field.

Upstreaming http://code.google.com/p/chromium/issues/detail?id=125796
Comment 1 Alexander Pavlov (apavlov) 2012-05-11 06:11:13 PDT
Created attachment 141394 [details]
Patch
Comment 2 Yury Semikhatsky 2012-05-11 06:16:37 PDT
Comment on attachment 141394 [details]
Patch

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

> Source/WebCore/inspector/front-end/HelpScreen.js:50
> +    this.closeKeys = [

Can we have a virtual method instead and override it in SettingsScreen or pass the key set as a parameter to the constructor? We don't override fields in the front-end code.
Comment 3 Alexander Pavlov (apavlov) 2012-05-11 06:26:42 PDT
Created attachment 141398 [details]
Patch
Comment 4 Alexander Pavlov (apavlov) 2012-05-11 06:42:03 PDT
Committed r116762: <http://trac.webkit.org/changeset/116762>