Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8572611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:03:36+00:00 2026-06-11T19:03:36+00:00

When a specific textarea is copied I want it to be hidden AFTER being

  • 0

When a specific textarea is copied I want it to be hidden AFTER being copied. I have the following code:

    $('#textarea20').on('copy', function() {    
    $('#textarea20').hide();
});

As you see this will hide it then the browser will try to copy a field that is hidden so it will copy nothing to the clipboard. Can you think of any way I can handle this? Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:03:38+00:00Added an answer on June 11, 2026 at 7:03 pm

    Deferring the hide() by a few milliseconds should work.

    Demo: http://jsfiddle.net/techfoobar/uxmRs/

    Code:

    $('textarea').on('copy', function() {    
        setTimeout(function() {
            $('textarea').hide();
        }, 10);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website with the following code for a specific element: <textarea id=textToTranslate
I have this textarea (it's expaned, after clicking on a specific button) which is
I want to apply ckeditor on specific textarea in django admin form not on
I creating jquery code to generate specific html-blocks that contains html-controls (e.g. textbox, textarea,
I have a long text in a gas TextArea and I want to scroll
I have a textarea where when the user selects and presses enter I want
I have some JQuery code that converts all HTML elements of a specific class
I have an with my code and I have one particular textarea that I
A few hours ago, I was instructed how to style a specific textarea with
is it posible to replace a character at a specific position within a textarea

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.