Open Bug 1511798 Opened 6 years ago Updated 2 years ago

Paste and cut enabled in right click menu even though input/textarea is readonly

Categories

(Firefox :: Menus, defect, P3)

defect

Tracking

()

Tracking Status
firefox63 --- affected
firefox64 --- affected
firefox65 --- affected

People

(Reporter: sjom106, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.75 Safari/537.36 Steps to reproduce: 1. Navigate to https://jsfiddle.net/SamMiller/58zhtov4/ 2. Right click in either the input or textarea. 3. The context menu contains both Cut and Paste, even though both the input and textarea are readonly. Actual results: Clicking paste does nothing (because the input/textarea is readonly). Clicking cut copies a bit of selected text to the clipboard, but it doesn't remove the bit of text (because the input/textarea is readonly). Expected results: Both Cut and Paste menu items should be disabled as it makes no sense for them to be enabled for readonly inputs/textareas. Chrome/Edge/IE11 all behave sensibly (i.e., they either don't show Cut/Paste in the context menu, or they are disabled).
Hi, I've managed to reproduce this issue. I will add a component so that the developers can take a look at it. Thank you for reporting!
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core
Version: 63 Branch → Trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true
I'm guessing the place to handle this is in the Firefox code. Mike, do you know where this bug should live?
Flags: needinfo?(mconley)

Yep, Firefox :: Menus. Thanks!

Component: Layout: Form Controls → Menus
Flags: needinfo?(mconley)
Product: Core → Firefox

Note that there's also bug 253870 to do actually the opposite.

See Also: → 253870
Priority: -- → P3

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

Note that there's also bug 253870 to do actually the opposite.

I don't think the two bugs contradict each other at all since "copy" doesn't mutate the field whereas "cut" and "paste" do. A user should always be able to copy if there is a selection but they shouldn't be able to mutate a disabled or read-only field.

Yeah, fair enough.

See Also: → 1692673
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.