Skip to content
Browse files

MDL-34328: block dragdrop - disallow dragging from show/hide and dock…

… icons

Tell the YUI drag/drop delegate that the show/hide and dock icons are not valid drag handles.  Otherwise, a drag can be initiated by showing or hiding a block (probably not from docking one, but better safe than sorry).  Not strictly related to MDL-34328, but likely to be encountered whilst testing - and closely related to another patch for MDL-34328.

Note that the "invalid" config option for the delegate takes a string - not an array - but can have multiple selectors separated by commas.
  • Loading branch information...
1 parent 6cc43fe commit 1e78b3e66f07d8f85bb0089c10f8e18edf380ceb @pauln pauln committed with andrewnicols Sep 5, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/yui/blocks/blocks.js
View
1 lib/yui/blocks/blocks.js
@@ -74,6 +74,7 @@ YUI.add('moodle-core-blocks', function(Y) {
nodes: '.'+CSS.BLOCK,
target: true,
handles: ['.'+CSS.HEADER],
+ invalid: '.block-hider-hide, .block-hider-show, .moveto',
dragConfig: {groups: this.groups}
});
del.dd.plug(Y.Plugin.DDProxy, {

0 comments on commit 1e78b3e

Please sign in to comment.
Something went wrong with that request. Please try again.