1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-25 10:26:17 +02:00

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:
Andrew Nicols 2013-12-03 14:20:49 +08:00
parent 0bb56f2e31
commit 2f13dd98b0
4 changed files with 4 additions and 4 deletions

@ -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');

File diff suppressed because one or more lines are too long

@ -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');

@ -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');