diff --git a/suite/common/bookmarks/bookmarksMenu.js b/suite/common/bookmarks/bookmarksMenu.js index 64a275f1fd0..80a9f8d80a3 100644 --- a/suite/common/bookmarks/bookmarksMenu.js +++ b/suite/common/bookmarks/bookmarksMenu.js @@ -722,6 +722,8 @@ var BookmarksToolbar = return; var chevron = document.getElementById("bookmarks-chevron"); var width = buttons.boxObject.x + buttons.boxObject.width; + chevron.collapsed = false; + var chevronWidth = chevron.boxObject.width; chevron.collapsed = true; var overflowed = false; @@ -729,7 +731,9 @@ var BookmarksToolbar = var button = buttons.childNodes[i]; button.collapsed = overflowed; - if (button.boxObject.x + button.boxObject.width > width) { + if (i == buttons.childNodes.length - 1) + chevronWidth = 0; + if (button.boxObject.x + button.boxObject.width + chevronWidth > width) { overflowed = true; // This button doesn't fit. Show it in the menu. Hide it in the toolbar. if (!button.collapsed)