Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Force paste" option that bypasses onpaste handlers #22567

Closed
bridiver opened this issue Apr 26, 2022 · 6 comments · Fixed by brave/brave-core#13178
Closed

Add "Force paste" option that bypasses onpaste handlers #22567

bridiver opened this issue Apr 26, 2022 · 6 comments · Fixed by brave/brave-core#13178

Comments

@bridiver
Copy link
Contributor

Description

Some sites use onpaste handlers to prevent pasting things like passwords. This is obviously bad (you should be using a password manager) and annoying. We should have a way to paste without triggering onpaste handlers

Steps to Reproduce

  1. go to https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onpaste
  2. copy and paste something into the input field
  3. "You pasted text!" appears

Expected result:

  1. go to https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onpaste
  2. copy and force paste something into the input field
  3. "You pasted text!" does not appear
@bridiver bridiver added OS/Android Fixes related to Android browser functionality OS/Desktop labels Apr 26, 2022
@bridiver
Copy link
Contributor Author

bridiver commented Apr 26, 2022

image

With regular paste
image (1)

With force paste
image (2)

@MadhaviSeelam
Copy link

Verification PASSED using

Brave | 1.41.50 Chromium: 102.0.5005.99 (Official Build) nightly (64-bit)
-- | --
Revision | 870f7bcc58dfa811cc68c2186439721385e086d0-refs/branch-heads/5005@{#1125}
OS | Windows 11 Version 21H2 (Build 22000.675)

Followed test plan from ##22567 (comment)

  1. Install 1.41.50
  2. Launch brave
  3. Go to https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onpaste
  4. Confirmed Force Paste option is added to context menu
  5. Copy text (brave) and Force paste into the input field
  6. Confirmed Your pasted text! is not shown
  7. Verified Your pasted text! is still shown when copy and paste text (brave) into the input field
Step4 Step5&6 Step7
image image image

@stephendonner
Copy link

Verification PASSED using

Brave 1.41.50 Chromium: 102.0.5005.99 (Official Build) nightly (x86_64)
Revision 870f7bcc58dfa811cc68c2186439721385e086d0-refs/branch-heads/5005@{#1125}
OS macOS Version 12.5 (Build 21G5037d)

Followed test plan from ##22567 (comment)

Steps

  1. installed 1.41.50
  2. launched Brave
  3. loaded https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onpaste
  4. confirmed Force Paste option is added to context menu
  5. copied text (brave) and Force pasted into the input field
  6. confirmed Your pasted text! is not shown
  7. verified Your pasted text! is still shown when copy and paste text (brave) into the input field
Step 4 Steps 5&6 Step 7
Screen Shot 2022-06-09 at 3 34 46 PM Screen Shot 2022-06-09 at 3 35 27 PM Screen Shot 2022-06-09 at 3 36 08 PM

@stephendonner
Copy link

stephendonner commented Jun 28, 2022

Verification PASSED using

Brave 1.41.80 Chromium: 103.0.5060.53 (Official Build) beta (64-bit)
Revision a1711811edd74ff1cf2150f36ffa3b0dae40b17f-refs/branch-heads/5060@{#853}
OS Linux

Followed test plan from ##22567 (comment)

Steps

  1. installed 1.41.80
  2. launched Brave
  3. loaded https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onpaste
  4. confirmed Force Paste option is added to context menu
  5. copied text (brave) and Force pasted into the input field
  6. confirmed Your pasted text! is not shown
  7. verified Your pasted text! is still shown when copy and paste text (brave) into the input field
Step 4 Steps 5&6 Step 7
Screen Shot 2022-06-27 at 6 34 39 PM Screen Shot 2022-06-27 at 6 35 06 PM Screen Shot 2022-06-27 at 6 35 35 PM

@utdrmac
Copy link

utdrmac commented Nov 28, 2023

How do I enable force paste by default? I don't want to have to keep clicking this menu. There should be an option to always force paste.

@bridiver
Copy link
Contributor Author

How do I enable force paste by default? I don't want to have to keep clicking this menu. There should be an option to always force paste.

Please open a new issue for this request, this issue is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment