Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js

Issue 1918613002: DevTools: Switching to custom user agent no longer clears preexisting value (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made input always editable Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js
index 9b80ad4c61d8c3441fecf6bde28b345ceb4fd6db..c80891ac910089bdc6f32254e641cde405adaeff 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js
@@ -115,9 +115,8 @@ WebInspector.NetworkConfigView.createUserAgentSelectAndInput = function()
settingChanged();
userAgentSelectElement.addEventListener("change", userAgentSelected, false);
- otherUserAgentElement.addEventListener("dblclick", textDoubleClicked, true);
otherUserAgentElement.addEventListener("blur", textChanged, false);
- otherUserAgentElement.addEventListener("keydown", textKeyDown, false);
+ otherUserAgentElement.addEventListener("keyup", textChanged, false);
function userAgentSelected()
{
@@ -126,10 +125,7 @@ WebInspector.NetworkConfigView.createUserAgentSelectAndInput = function()
userAgentSetting.set(value);
otherUserAgentElement.value = value;
otherUserAgentElement.title = value;
- otherUserAgentElement.readOnly = true;
} else {
- otherUserAgentElement.readOnly = false;
- otherUserAgentElement.value = "";
otherUserAgentElement.focus();
}
}
@@ -147,7 +143,6 @@ WebInspector.NetworkConfigView.createUserAgentSelectAndInput = function()
}
}
- otherUserAgentElement.readOnly = selectionRestored;
if (!selectionRestored)
userAgentSelectElement.selectedIndex = 0;
@@ -157,20 +152,6 @@ WebInspector.NetworkConfigView.createUserAgentSelectAndInput = function()
}
}
- function textKeyDown(event)
- {
- if (isEnterKey(event))
- textChanged();
- }
-
- function textDoubleClicked()
- {
- if (userAgentSelectElement.selectedIndex === 0)
- return;
- userAgentSelectElement.selectedIndex = 0;
- userAgentSelected();
- }
-
function textChanged()
{
if (userAgentSetting.get() !== otherUserAgentElement.value) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698