| Index: chrome/browser/resources/md_bookmarks/dnd_manager.js
|
| diff --git a/chrome/browser/resources/md_bookmarks/dnd_manager.js b/chrome/browser/resources/md_bookmarks/dnd_manager.js
|
| index a4423b3d66b89aa10cdd4e9f55c7bd8711cac4a3..71b1bcde1da76d1ec6d9c480ed6bf02d73021274 100644
|
| --- a/chrome/browser/resources/md_bookmarks/dnd_manager.js
|
| +++ b/chrome/browser/resources/md_bookmarks/dnd_manager.js
|
| @@ -426,6 +426,13 @@ cr.define('bookmarks', function() {
|
|
|
| e.preventDefault();
|
|
|
| + // If any node can't be dragged, early return (after preventDefault).
|
| + var anyUnmodifiable = draggedNodes.some(function(itemId) {
|
| + return !bookmarks.util.canEditNode(state, itemId);
|
| + });
|
| + if (anyUnmodifiable)
|
| + return;
|
| +
|
| // If we are dragging a single link, we can do the *Link* effect.
|
| // Otherwise, we only allow copy and move.
|
| if (e.dataTransfer) {
|
| @@ -475,7 +482,6 @@ cr.define('bookmarks', function() {
|
| if (!overElement)
|
| return;
|
|
|
| -
|
| // Now we know that we can drop. Determine if we will drop above, on or
|
| // below based on mouse position etc.
|
| this.dropDestination_ =
|
| @@ -547,6 +553,9 @@ cr.define('bookmarks', function() {
|
| if (isBookmarkList(overElement))
|
| itemId = state.selectedFolder;
|
|
|
| + if (!bookmarks.util.canReorderChildren(state, itemId))
|
| + return DropPosition.NONE;
|
| +
|
| // Drags of a bookmark onto itself or of a folder into its children aren't
|
| // allowed.
|
| if (dragInfo.isDraggingBookmark(itemId) ||
|
|
|