Skip to content

Commit

Permalink
MDL-46157 drag and drop: Improve item labels
Browse files Browse the repository at this point in the history
Ignore the edit menu when determining the region to drag.
  • Loading branch information
cameorn1730 committed Sep 8, 2015
1 parent 1dabede commit 9b5882d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ Y.extend(DRAGDROP, Y.Base, {
*/
find_element_text: function(n) {
// The valid node types to get text from.
var nodes = n.all('h2, h3, h4, h5, span, p, div.no-overflow, div.dimmed_text');
var nodes = n.all('h2, h3, h4, h5, span:not(.actions):not(.menu-action-text), p, div.no-overflow, div.dimmed_text');
var text = '';

nodes.each(function () {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/yui/build/moodle-core-dragdrop/moodle-core-dragdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ Y.extend(DRAGDROP, Y.Base, {
*/
find_element_text: function(n) {
// The valid node types to get text from.
var nodes = n.all('h2, h3, h4, h5, span, p, div.no-overflow, div.dimmed_text');
var nodes = n.all('h2, h3, h4, h5, span:not(.actions):not(.menu-action-text), p, div.no-overflow, div.dimmed_text');
var text = '';

nodes.each(function () {
Expand Down
2 changes: 1 addition & 1 deletion lib/yui/src/dragdrop/js/dragdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ Y.extend(DRAGDROP, Y.Base, {
*/
find_element_text: function(n) {
// The valid node types to get text from.
var nodes = n.all('h2, h3, h4, h5, span, p, div.no-overflow, div.dimmed_text');
var nodes = n.all('h2, h3, h4, h5, span:not(.actions):not(.menu-action-text), p, div.no-overflow, div.dimmed_text');
var text = '';

nodes.each(function () {
Expand Down

0 comments on commit 9b5882d

Please sign in to comment.