Skip to content

Commit

Permalink
prevent version select being autocompleted by the browser (#1225)
Browse files Browse the repository at this point in the history
This fixes an issue where when you navigate back in history, the
browser pre-fills the select with the value from just after you
navigated.

Repro:

1. Navigate to lit.dev.
2. Select `v1`, and be navigated to the v1 docs.
3. Press back in history, and note the select is set to v1.
  • Loading branch information
AndrewJakubowicz authored Oct 13, 2023
1 parent 2e14846 commit c24e5ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lit-dev-content/site/_includes/site-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a href="{{ site.baseurl }}/docs/">Documentation</a>

<litdev-version-selector>
<select name="version">
<select name="version" autocomplete="off">
{% for version, versionData in versions %}
<option value="{{ version }}"
{% if version == selectedVersion %}
Expand Down

0 comments on commit c24e5ab

Please sign in to comment.