Ignore specific input from being observed
See original GitHub issueHi,
In my use case, I have a list that has a search input to filter the list items. Using the search input or blurring it will bind it to the form elements, which is unnecessary to the form.
What I have done as a workaround is I add an extra check to isFormMember
to check if the element has id=“ignore” attribute, in which it will not be considered a form element.
It works but it looks awfully wrong. I’m willing to submit a PR if there is any other suggested method to avoid adding an unwanted element to the form.
Thank you 👍
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Stop an input field in a form from being submitted
I inspected the post data using WebScarab and found that the data is being sent. For now I guess I will have to...
Read more >Maybe Ignore type=search - Adrian Roselli
If you have a valid, accessible search field (with a useful, sensible label) then you can probably ignore type="search" and use type="text" ...
Read more >How to Suppress Text, Images, and User Input from Collected ...
How to Suppress Text, Images, and User Input from Collected Data ... Personally-Identifying Information (PII) can appear in your page content or in...
Read more >Solved: Disable specific input during EDIT mode
Solved: I would like to know is there anyway to disable certain form input during edit mode? What I looking for is allow...
Read more >How to turn off form autocompletion - Web security | MDN
This article explains how a website can disable autocomplete for form fields.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@noahsalvi Yep, it works now with beta.2 👍🏻 I will open a new issue with the issue I mentioned before on one of your commits.
Thanks a lot for the effort and for the great enhancements. cheers 👍🏻
@noahsalvi <del>This is a bit tricky, I added the attribute and using
console.log(node)
I’m able to see the element, but when I callnode['data-suf-ignore]
it returns asundefined
even tho svelte compiler has marked the attribute as aboolean
value, so it should be false by default. Instead it returnsundefined
</del><del>So I gave it a value and still fail to read 😓 </del>
<del>I’m for sure doing something wrong 😄</del>
UPDATE:
node.hasAttribute("data-suf-ignore");
did the trick 👍🏻