Skip to content

Commit

Permalink
fix: handle clicks on TOC button arrow (resolves #712) (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander authored Apr 3, 2021
1 parent 1d345e2 commit f589836
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/src/scripts/routes/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
// Cast the state as a boolean
let expanded = btn.getAttribute( 'aria-expanded' ) === 'true' || false;

if ( btn === e.target || svg === e.target ) {
if ( btn === e.target || svg === e.target.closest( 'svg' ) ) {
// Switch the state
btn.setAttribute( 'aria-expanded', ! expanded );
// Switch the content's visibility
Expand Down
2 changes: 1 addition & 1 deletion dist/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/scripts/book.js": "/scripts/book.js?id=bc1e45dbfaeac841f0a2",
"/scripts/book.js": "/scripts/book.js?id=209ba93d22103a35854d",
"/styles/book.css": "/styles/book.css?id=3cbb775c3b4e63c64468",
"/styles/web-house-style.css": "/styles/web-house-style.css?id=d3c1aedc7525b0f30ccd",
"/scripts/collapse-sections.js": "/scripts/collapse-sections.js?id=ba8eb815cea5fd273013",
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/book.js

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

0 comments on commit f589836

Please sign in to comment.