Clear text on value clear
See original GitHub issueIf the input is cleared using something like:
document.getElementById('fileInput').value = '';
The filename stays in place even though the underlying input has been cleared.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
How To Clear Input Field on Focus
Click on the input field to clear it: Clear Input Field on Focus. Example. <!-- When the input field gets focus, replace its...
Read more >How to clear textbox value using jQuery
Clear all textbox $(document).ready(function() { $('input[type=text]'). · Clear single textbox value $(document).ready(function() { $('#txtID').
Read more >Clear text field value in JQuery - javascript
In simple way, you can use the following code to clear all the text field, textarea, dropdown, radio ...
Read more >HTML | Clearing the input field
To clear the entire input field without having to delete the whole ... "text" onfocus = "this.value=''" value = "Click here to clear"...
Read more >Proper way to "clear" value from Text input
In Step 2 the user opens the item and "removes" the value they had entered (i.e. they erase the value to represent a...
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
That PR wouldn’t fix this issue because changing the value in the JS won’t fire the change event. As you suggested, a refresh method for the control would be needed. form.reset works but not if you just want to change the value of that control without resetting the rest of the form.
Maybe before the PR of @CometS1, @tracerx you can try something like that:
EDIT:
BTW it works pretty well see: https://codepen.io/Johann-S/pen/LXOYbR