0

I have a website that has a bunch of inputs, including (up to) 50 file inputs and a textarea. If you use Google Chrome on a Mac there is a current issue where the text is pasted as an image, and then it fills some of the 50 file inputs (triggering a cropper).

The only way I can think of getting around this is to capture the paste and disable it site wide (I don't want to disable the entire right click function for this). That's easy enough to do with cmd + v but users can get round this with right click > paste or using the menu to paste content in. Is there a universal way to intercept all pasted data for Chrome on Mac?

Alternatively does someone have a better idea on how to get around this bug?

Community
  • 1
  • 1
Styphon
  • 10,304
  • 9
  • 52
  • 86

1 Answers1

0

Return false on the "contextmenu-event" like this:4

<body oncontextmenu="return false;">

You should of course only set this to the components that you want to disable. Body was just an example ;)

Joakim M
  • 1,793
  • 2
  • 14
  • 29
  • I don't really want to disable the entire right click. Plus that doesn't stop people pasting via the menu. – Styphon Nov 10 '14 at 09:26