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

Unified Diff: chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js

Issue 2444373003: Adding/renaming a folder in the bookmark manager should not hide the icon. (Closed)
Patch Set: Review comments Created 4 years, 2 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 | « chrome/browser/resources/bookmark_manager/css/bmm.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js
diff --git a/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js b/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js
index 7582698b0f1c1a5e11cf8bdba7afa961cb1262e3..4914b68e8c26e355cd7f83febb7473aebaccd6e4 100644
--- a/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js
+++ b/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js
@@ -479,8 +479,6 @@ cr.define('bmm', function() {
var title = this.bookmarkNode.title;
var isFolder = bmm.isFolder(this.bookmarkNode);
var listItem = this;
- var labelEl = this.firstChild;
- var urlEl = labelEl.nextSibling;
var labelInput, urlInput;
// Handles enter and escape which trigger reset and commit respectively.
@@ -546,6 +544,8 @@ cr.define('bmm', function() {
}
var doc = this.ownerDocument;
+ var labelTextEl = queryRequiredElement('.label-text', this);
+ var urlEl = queryRequiredElement('.url', this);
if (editing) {
this.setAttribute('editing', '');
this.draggable = false;
@@ -553,7 +553,7 @@ cr.define('bmm', function() {
labelInput = /** @type {HTMLElement} */(doc.createElement('input'));
labelInput.placeholder =
loadTimeData.getString('name_input_placeholder');
- replaceAllChildren(labelEl, labelInput);
+ replaceAllChildren(labelTextEl, labelInput);
labelInput.value = title;
if (!isFolder) {
@@ -629,7 +629,7 @@ cr.define('bmm', function() {
labelInput = this.querySelector('.label input');
var newLabel = labelInput.value;
- labelEl.textContent = this.bookmarkNode.title = newLabel;
+ labelTextEl.textContent = this.bookmarkNode.title = newLabel;
if (isFolder) {
if (newLabel != title) {
« no previous file with comments | « chrome/browser/resources/bookmark_manager/css/bmm.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698