Skip to content
Snippets Groups Projects
Commit 26ae3d6c authored by Olivia206's avatar Olivia206
Browse files

cleaned js for modal

parent 0bc9883e
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ class Modal {
window.addEventListener('keydown', (event) => {
if (event.keyCode === 27 || event.key === 'Escape') {
this.toggle(false);
} else if (this.state.isOpened && event.key === "Tab") {
} else if (event.key === "Tab" && this.state.isOpened) {
this.innerFocus(event);
event.preventDefault();
}
......@@ -67,8 +67,6 @@ class Modal {
else if (!this.element.contains(event.target)) {
firstFocusable.focus();
}
// this.closeButtons[0].focus();
firstFocusable.focus();
}
......@@ -78,10 +76,6 @@ class Modal {
this.element.setAttribute('aria-hidden', !this.state.isOpened);
document.documentElement.classList[classAction](CLASSES.modalOpened);
// if (!this.state.isOpened) {
// this.button.focus();
// }
}
}
......
<article class="volume">
<article class="volume" itemscope itemtype="https://schema.org/Book https://schema.org/PublicationVolume">
<hgroup>
<p class="suptitle">{{ i18n "volumes.volume_number" (dict "Number" .Params.Number) }}</p>
<h2><a href="{{ .Permalink }}" title="{{ i18n "commons.more_aria" (dict "Title" .Title) }}">{{ partial "PrepareHTML" .Title }}</a></h2>
<p class="suptitle" itemprop="volumeNumber">{{ i18n "volumes.volume_number" (dict "Number" .Params.Number) }}</p>
<h2><a href="{{ .Permalink }}" title="{{ i18n "commons.more_aria" (dict "Title" .Title) }}" itemprop="name">{{ partial "PrepareHTML" .Title }}</a></h2>
</hgroup>
<div class="media">
{{- if .Params.image -}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment