question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Q: How to clear field input

See original GitHub issue

Hi @kensoh

I’m ashamed to ask but how can I clear a (textarea) input? For example a basic text field input or textarea?

Currently when using textarea:

type //textarea as Lorem ipsum

It adds to the existing text in the textarea.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
kensohcommented, Aug 4, 2017

Hi @thim81 I’ve just committed to master with following comment.

For users wanting to use this before the packaged releases are out for the next release, you can download from master and overwrite your local copy (be careful if you already made local changes!)

Introduce [clear] keyword for step type / enter

Examples -
type element as [clear]
type email_element as [clear]test@email.com
type password_element as [clear]123456[enter]

Assumption is [clear] is always used at the start of the string to
type. Not a normal use case to type something then clear it. So TagUI
checks whether the string to type begins with [clear].
1reaction
kensohcommented, Jul 27, 2017

Thanks @thim81 it sounds like this will be better to be part of the type / enter step. Probably adding a [clear] keyword to signify emptying the field. Firefox/PhantomJS should be straightforward, Chrome need to add something more. Classifying as enhancement.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Clear Input Field on Focus - W3Schools
Learn how to clear an input field on focus. Click on the input field to clear it: Clear Input Field on Focus. Example....
Read more >
Clear input fields on form submit - javascript - Stack Overflow
Use the reset function, which is available on the form element. var form = document.getElementById("myForm"); form.reset();.
Read more >
How to Clear Input Fields in JavaScript - Linux Hint
To clear input fields in JavaScript, use the onfocus event and target property,onclick event and document.getElementById() method or the reset() method.
Read more >
Q: How to clear field input #33 - aisingapore/TagUI · GitHub
Hi @kensoh I'm ashamed to ask but how can I clear a (textarea) input? For example a basic text field input or textarea?...
Read more >
<input type="search"> - HTML: HyperText Markup Language
<input> elements of type search are text fields designed for the user to enter search ... <input type="search" id="site-search" name="q">.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found