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

  • SEARCH
  • Home
  • 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 8805227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:48:40+00:00 2026-06-14T01:48:40+00:00

Some form validators block CTRL + C / CTRL + V on some input

  • 0

Some form validators block CTRL+C/CTRL+V on some input fields. Is there a quick bookmarklet or something that could allow me to use my keyboard properly. Or, perhaps, browsers allow my to override that kind of rude behavior of some pages?

EDIT: What I’m looking for is similar solution like the one that can be used to enable right-click on a page by executing a javascript snippet withing context of the page:

javascript:void(document.oncontextmenu=null) 

So far, I think that there is no similar solution with javascript snippet without involvment with 3rd party tools like Greasemonkey

  • 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-14T01:48:41+00:00Added an answer on June 14, 2026 at 1:48 am

    That depends on how it is done. Also, removing/disabling event listeners is always risky, you might harm the functionality of the site seriously – and you never know whether a handler does evil or good things, least you can know whether there is a handler at all.

    So, I’ve skimmed the first few Google results for “javascript prevent copy paste” and found mostly foolish scripts: Disable pasting text into HTML form, Prevent Copy, Cut and Paste into HTML Input Text Fields, not working example. So what a script could do now:

    • remove all on-copy, -paste, -input, -cut, -drag, etc properties of input elements
    • capture these event types on the document and stop their propagation, so (bubble) handlers will never get called and can’t prevent the default action

    Yet, as already said, this can’t hinder everything. The input event, a very useful one, is cleverly used by this solution to prevent inserting more than one character at once. So you would need to decide whether you want to stop that event and possible break the application.

    var evts = ["copy", "paste", "cut", "drag", "selectionstart?", "input?", …?];
    var els = [document, document.body].concat(
      [].slice.call(document.getElementsByTagName("input")),
      [].slice.call(document.getElementsByTagName("textarea"))
    );
    function trap(e) { e.stopPropagation(); }
    for (var i=0; i<evts.length; i++) {
        var evt = "on"+evts[i].charAt(0).toUpperCase()+evts[i].substr(1);
        for (var j=0; j<els.length; j++)
            els[j][evt] = null; // remove handler
        document.addEventListener(evts[i], trap, true); // capture phase
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that has some standard ASP.NET validators and some custom validators.
I do some form validation to ensure that the file a user uploaded is
I'm using below code to check some form fields and render datatable table on
I've created a page which asks user to fill some form fields and when
I have a form built with some custom validators and they work like a
I'm using Zend_Validate to validate some form input (Zend Framework version is 1.8.2). For
I want to validate some form fields in the server side, but I don't
I have an IceFaces form with several HtmlCommandButtons on it. I have some input
I have a form representing a survey that is dynamically generated based on some
I'm doing some programmatic validation of some field values in a form, is there

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.