MDL-42989 JavaScript: Do not attempt to expand navigation when opening link
When clicking on a link which is also expandable, we should not attempt to expand it.
This commit is contained in:
+1
-1
@@ -592,7 +592,7 @@ BRANCH.prototype = {
|
||||
} else {
|
||||
e.stopPropagation();
|
||||
}
|
||||
if (e.type === 'actionkey' && e.action === 'enter' && e.target.test('A')) {
|
||||
if ((e.type === 'actionkey' && e.action === 'enter') || e.target.test('a')) {
|
||||
// No ajaxLoad for enter.
|
||||
this.node.setAttribute('data-expandable', '0');
|
||||
this.node.setAttribute('data-loaded', '1');
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
blocks/navigation/yui/build/moodle-block_navigation-navigation/moodle-block_navigation-navigation.js
Vendored
+1
-1
@@ -591,7 +591,7 @@ BRANCH.prototype = {
|
||||
} else {
|
||||
e.stopPropagation();
|
||||
}
|
||||
if (e.type === 'actionkey' && e.action === 'enter' && e.target.test('A')) {
|
||||
if ((e.type === 'actionkey' && e.action === 'enter') || e.target.test('a')) {
|
||||
// No ajaxLoad for enter.
|
||||
this.node.setAttribute('data-expandable', '0');
|
||||
this.node.setAttribute('data-loaded', '1');
|
||||
|
||||
+1
-1
@@ -590,7 +590,7 @@ BRANCH.prototype = {
|
||||
} else {
|
||||
e.stopPropagation();
|
||||
}
|
||||
if (e.type === 'actionkey' && e.action === 'enter' && e.target.test('A')) {
|
||||
if ((e.type === 'actionkey' && e.action === 'enter') || e.target.test('a')) {
|
||||
// No ajaxLoad for enter.
|
||||
this.node.setAttribute('data-expandable', '0');
|
||||
this.node.setAttribute('data-loaded', '1');
|
||||
|
||||
Reference in New Issue
Block a user