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

Side by Side Diff: chrome/browser/resources/bookmark_manager/main.html

Issue 1780015: Fix Dropping in the bookmark manager (Closed)
Patch Set: Fix Nits Created 10 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html i18n-values="dir:textdirection"> 2 <html i18n-values="dir:textdirection">
3 <!-- 3 <!--
4 4
5 Copyright (c) 2010 The Chromium Authors. All rights reserved. 5 Copyright (c) 2010 The Chromium Authors. All rights reserved.
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 --> 9 -->
10 <head> 10 <head>
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 clearDragData: function() { 889 clearDragData: function() {
890 this.dragData = null; 890 this.dragData = null;
891 }, 891 },
892 892
893 handleChromeDragEnter: function(dragData) { 893 handleChromeDragEnter: function(dragData) {
894 this.dragData = dragData; 894 this.dragData = dragData;
895 }, 895 },
896 896
897 init: function() { 897 init: function() {
898 var boundClearData = cr.bind(this.clearDragData, this); 898 var boundClearData = cr.bind(this.clearDragData, this);
899 function deferredClearData() {
900 setTimeout(boundClearData);
901 }
899 902
900 document.addEventListener('dragstart', cr.bind(this.handleDragStart, this)); 903 document.addEventListener('dragstart', cr.bind(this.handleDragStart, this));
901 document.addEventListener('dragenter', cr.bind(this.handleDragEnter, this)); 904 document.addEventListener('dragenter', cr.bind(this.handleDragEnter, this));
902 document.addEventListener('dragover', cr.bind(this.handleDragOver, this)); 905 document.addEventListener('dragover', cr.bind(this.handleDragOver, this));
903 document.addEventListener('dragleave', cr.bind(this.handleDragLeave, this)); 906 document.addEventListener('dragleave', cr.bind(this.handleDragLeave, this));
904 document.addEventListener('drop', cr.bind(this.handleDrop, this)); 907 document.addEventListener('drop', cr.bind(this.handleDrop, this));
905 document.addEventListener('dragend', boundClearData); 908 document.addEventListener('dragend', deferredClearData);
909 document.addEventListener('mouseup', deferredClearData);
906 910
907 chrome.experimental.bookmarkManager.onDragEnter.addListener(cr.bind( 911 chrome.experimental.bookmarkManager.onDragEnter.addListener(cr.bind(
908 this.handleChromeDragEnter, this)); 912 this.handleChromeDragEnter, this));
909 chrome.experimental.bookmarkManager.onDragLeave.addListener(boundClearData); 913 chrome.experimental.bookmarkManager.onDragLeave.addListener(
910 chrome.experimental.bookmarkManager.onDrop.addListener(boundClearData); 914 deferredClearData);
915 chrome.experimental.bookmarkManager.onDrop.addListener(deferredClearData);
911 } 916 }
912 }; 917 };
913 918
914 dnd.init(); 919 dnd.init();
915 920
916 </script> 921 </script>
917 922
918 <!-- Organize menu --> 923 <!-- Organize menu -->
919 <command i18n-values=".label:rename_folder" id="rename-folder-command"></command > 924 <command i18n-values=".label:rename_folder" id="rename-folder-command"></command >
920 <command i18n-values=".label:edit" id="edit-command"></command> 925 <command i18n-values=".label:edit" id="edit-command"></command>
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 localStrings.templateData = data; 1590 localStrings.templateData = data;
1586 i18nTemplate.process(document, data); 1591 i18nTemplate.process(document, data);
1587 }); 1592 });
1588 1593
1589 </script> 1594 </script>
1590 1595
1591 <div id="drop-overlay"></div> 1596 <div id="drop-overlay"></div>
1592 1597
1593 </body> 1598 </body>
1594 </html> 1599 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698