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

Unified Diff: Source/devtools/front_end/SearchableView.js

Issue 232133008: DevTools: Make replace checkbox id in SearchableView unique. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « LayoutTests/inspector/editor/text-editor-search-replace.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/SearchableView.js
diff --git a/Source/devtools/front_end/SearchableView.js b/Source/devtools/front_end/SearchableView.js
index cde4ef7ff4e35bacaf862c60ab8570bfec522b49..c0d8a718236c520a2c672fb37999086a84735a1d 100644
--- a/Source/devtools/front_end/SearchableView.js
+++ b/Source/devtools/front_end/SearchableView.js
@@ -105,12 +105,14 @@ WebInspector.SearchableView = function(searchable)
this._replaceCheckboxElement = this._replaceElement.createChild("input");
this._replaceCheckboxElement.type = "checkbox";
- this._replaceCheckboxElement.id = "search-replace-trigger";
+ this._uniqueId = ++WebInspector.SearchableView._lastUniqueId;
+ var replaceCheckboxId = "search-replace-trigger" + this._uniqueId;
+ this._replaceCheckboxElement.id = replaceCheckboxId;
this._replaceCheckboxElement.addEventListener("change", this._updateSecondRowVisibility.bind(this), false);
this._replaceLabelElement = this._replaceElement.createChild("label");
this._replaceLabelElement.textContent = WebInspector.UIString("Replace");
- this._replaceLabelElement.setAttribute("for", "search-replace-trigger");
+ this._replaceLabelElement.setAttribute("for", replaceCheckboxId);
// Column 5
var cancelButtonElement = this._firstRowElement.createChild("td").createChild("button");
@@ -122,6 +124,8 @@ WebInspector.SearchableView = function(searchable)
this._registerShortcuts();
}
+WebInspector.SearchableView._lastUniqueId = 0;
+
WebInspector.SearchableView.findShortcuts = function()
{
if (WebInspector.SearchableView._findShortcuts)
« no previous file with comments | « LayoutTests/inspector/editor/text-editor-search-replace.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698