Skip to content

Commit bf3a808

Browse files
committed
fix(documentation): Change responsiveNavigation.js & header.html to fix #1090
1 parent 2cf3f43 commit bf3a808

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/_assets/javascripts/responsiveNavigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function responsiveNavigation() {
1313
var option = document.createElement('option');
1414
option.text = links[i].title;
1515
option.value = links[i].href;
16-
option.selected = true;
16+
option.selected = links[i].getAttribute('data-current') === 'true';
1717
navigationAsSelect.appendChild(option);
1818
}
1919

docs/_includes/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
{% assign url = page.url %}
4242
{% for link in site.navigation %}
4343
<li class='ac-nav-menu-list-item {% if url == link.url %}active{% endif %}'>
44-
<a data-path='{{ link.url }}' href="{{ site.baseurl }}{{ link.url }}" title="{{ link.text }}">{{ link.text }}</a>
44+
<a data-path='{{ site.baseurl }}{{ link.url }}' data-current="{% if url == link.url %}true{% endif %}" href="{{ site.baseurl }}{{ link.url }}" title="{{ link.text }}">{{ link.text }}</a>
4545
</li>
4646
{% endfor %}
4747
<li class='ac-nav-menu-list-icon'>

0 commit comments

Comments
 (0)