Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password input causes Chrome error [DOM] Found elements with non-unique id #60

Open
alexdiliberto opened this issue Oct 16, 2018 · 0 comments

Comments

@alexdiliberto
Copy link
Contributor

Here's the breaking diff by simply adding a password input type to the body of the liquid-wormhole in the Hello, World! initial example

diff --git a/tests/dummy/app/pods/index/template.md b/tests/dummy/app/pods/index/template.md
index 7478a37..9bdff04 100644
--- a/tests/dummy/app/pods/index/template.md
+++ b/tests/dummy/app/pods/index/template.md
@@ -10,6 +10,9 @@
   {{#if showHello}}
     {{#liquid-wormhole class="hello-world notification"}}
       Hello, World!
+      <form>
+        <input id="trigger-console-error" type="password">
+      </form>
     {{/liquid-wormhole}}
   {{/if}}
 </div>

Quick video showing the console error: http://recordit.co/cC7CPGgP1e

Since we clone DOM here with liquid-wormhole, the newly added <form> with its single password <input> triggers Chrome to throw a console error because now the newly added <input type="password"> is replicated X times in the DOM.

More information about the base Chrome error is explained here:

https://stackoverflow.com/questions/47806187/chrome-63-throws-dom-error-with-input-type-password-and-non-unique-ids

alexdiliberto added a commit to alexdiliberto/liquid-wormhole that referenced this issue Oct 16, 2018
alexdiliberto added a commit to alexdiliberto/liquid-wormhole that referenced this issue Oct 16, 2018
pzuraq added a commit that referenced this issue Oct 21, 2019
#60: Failing Test + Fix chrome password input duplicate ID console error
alexdiliberto added a commit to alexdiliberto/liquid-wormhole that referenced this issue Oct 21, 2019
* master:
  remove console warnings from chrome regarding form fields
  addressing PR comments to make behavior more generic
  [bugfix] Fix chrome password input duplicate id console error
  [test] Failing scenarios test for pzuraq#60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant