Skip to content

Commit

Permalink
Merge pull request #143 from ably/set-autocomplete-off-when-component…
Browse files Browse the repository at this point in the history
…-enabled

Set autocomplete to off when component enabled
  • Loading branch information
Dominik authored Jan 25, 2022
2 parents 519863c + bd1cd3f commit 8dde11a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% end %>

<div class="max-w-screen-xs">
<input type="text" placeholder="Company name" class="w-full" />
<input type="text" placeholder="Company name" class="w-full" name="company" />
</div>

<% content_for :component do %>
Expand Down
2 changes: 2 additions & 0 deletions src/core/CompanyAutocomplete/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ const handleEnter = (input, event) => {
const CompanyAutocomplete = (input, url) => {
if (!input || !url) return;

input.setAttribute("autocomplete", "off");

input.addEventListener(
"keyup",
throttle(
Expand Down

0 comments on commit 8dde11a

Please sign in to comment.