Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_wcms_ohana
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_wcms_ohana
Commits
5a188362
Commit
5a188362
authored
1 month ago
by
Martin Leblanc
Committed by
Kevin Paxman
3 weeks ago
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5650: Add check for bannerLinks
parent
7d0efad3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/patterns/04-components/banners/banners.js
+12
-9
12 additions, 9 deletions
src/patterns/04-components/banners/banners.js
with
12 additions
and
9 deletions
src/patterns/04-components/banners/banners.js
+
12
−
9
View file @
5a188362
...
@@ -116,18 +116,21 @@
...
@@ -116,18 +116,21 @@
// Get banner link.
// Get banner link.
var
bannerLink
=
banner
.
querySelector
(
'
.card__banner a
'
);
var
bannerLink
=
banner
.
querySelector
(
'
.card__banner a
'
);
// If banner links,
// Check for Tab key, find pause button and click it.
// Check for Tab key, find pause button and click it.
bannerLink
.
addEventListener
(
'
keydown
'
,
function
(
event
)
{
if
(
bannerLink
)
{
if
(
event
.
key
===
'
Tab
'
||
event
.
keyCode
===
9
)
{
bannerLink
.
addEventListener
(
'
keydown
'
,
function
(
event
)
{
var
banner
=
event
.
target
.
closest
(
'
.uw-carousel__banner
'
);
if
(
event
.
key
===
'
Tab
'
||
event
.
keyCode
===
9
)
{
if
(
banner
)
{
var
banner
=
event
.
target
.
closest
(
'
.uw-carousel__banner
'
);
var
pauseButton
=
banner
.
querySelector
(
'
.uw-pause
'
);
if
(
banner
)
{
if
(
pauseButton
)
{
var
pauseButton
=
banner
.
querySelector
(
'
.uw-pause
'
);
pauseButton
.
click
();
if
(
pauseButton
)
{
pauseButton
.
click
();
}
}
}
}
}
}
}
);
}
);
}
});
});
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment