Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Fix for 'New Folder' is not getting added to chrome://bookmarks/ thro…
Browse files Browse the repository at this point in the history
…ugh 'Organize' menu after adding 'addPage'

When we do add page then new node is added, but that node in not yet
commited, and have id as 'new', so we should not consider as the selected
item.
Changes added so that when the entry is not commited,
it should not be considered for calculating the nextIndex value.

BUG=447960

Review URL: https://codereview.chromium.org/835973004

Cr-Commit-Position: refs/heads/master@{#311200}
  • Loading branch information
deepak.m1 authored and Commit bot committed Jan 13, 2015
1 parent 7cba27c commit c69c700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chrome/browser/resources/bookmark_manager/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ function newFolder(opt_target) {
// Callback is called after tree and list data model updated.
function createFolder(callback) {
if (selectedItem && document.activeElement != bmm.tree &&
!bmm.isFolder(selectedItem)) {
!bmm.isFolder(selectedItem) && selectedItem.id != 'new') {
newIndex = bmm.list.dataModel.indexOf(selectedItem) + 1;
}
chrome.bookmarks.create({
Expand Down

0 comments on commit c69c700

Please sign in to comment.