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

Unified Diff: chrome/browser/resources/options/browser_options_startup_page_list.js

Issue 7585019: Options: Disable dragging when the list is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/browser_options_startup_page_list.js
diff --git a/chrome/browser/resources/options/browser_options_startup_page_list.js b/chrome/browser/resources/options/browser_options_startup_page_list.js
index d15995727f6966f5f9c0704e2f8427b03f3e610f..afdef5f7ddff8793d9ee8cbe1d964187aa0f11a2 100644
--- a/chrome/browser/resources/options/browser_options_startup_page_list.js
+++ b/chrome/browser/resources/options/browser_options_startup_page_list.js
@@ -83,6 +83,7 @@ cr.define('options.browser_options', function() {
urlField.addEventListener('blur', function(event) {
self.parentNode.autocompleteList.detach();
});
+
this.draggable = true;
},
@@ -171,6 +172,12 @@ cr.define('options.browser_options', function() {
* @private
*/
handleDragStart_: function(e) {
+ // Prevent dragging if the list is disabled.
+ if (this.disabled) {
+ e.preventDefault();
+ return false;
+ }
+
var target = e.target;
// StartupPageListItem should be the only draggable element type in the
// page but let's make sure.
« 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