Closed Bug 1104117 Opened 10 years ago Closed 10 years ago

can't paste in Facebook comment fields with clipboard events disabled

Categories

(Firefox :: Untriaged, defect)

33 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: vincent-moz, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 Build ID: 20141030112145 Steps to reproduce: Open a Facebook page where one can enter comments, select some text, and paste it with the middle button in a comment field (AFAIK, this problem doesn't occur in the Status field, only with comment fields). Actual results: The pasted text appears in the field, but typing [Return] no longer validates. I can type some additional text and validate with [Return], but the pasted text doesn't appear in the posted comment. If after the paste, I try to select pasted text and cut it, and do some editing, then strange things occur (the text is incorrectly redrawn, with duplicated text and so on, just like if the memory containing the text got corrupted). Expected results: I should get the usual behavior.
Summary: can't past in Facebook comment fields → can't paste in Facebook comment fields
I wonder whether the cause is that Facebook tracks the user key presses and in the case of a selection paste, it doesn't see anything, which could explain the observed behavior. But allowing a web page to spy the user on key presses is some form of privacy breach. In such a case, though some part of the problem could come from Facebook, there could be a workaround if a paste is (optionally) implemented as a succession of virtual key presses.
I can't reproduce this at all. Can you perhaps create a screencast using a test post? Facebook lets you create a post only visible to you, so you can use that to test with without messing with anything else... Also, does this happen if you restart with add-ons disabled (item in the help menu), so we can exclude add-ons from having anything to do with this? Finally, does it only happen if you use the middle mouse button? Not with ctrl-v or right-click, paste from the menu item?
Flags: needinfo?(vincent-moz)
The bug also occurs in safe mode. I've attached an image containing 3 snapshots. 1. Initial comment field. 2. Comment field after pasting "test" with the middle button. At this point, the cursor is at the end of the text (after "test"). If I type [Backspace] 1, 2 or 3 times, nothing happens. But the 4th time, the cursor is moved to the beginning of the text (before "test"). Just after that: 3. What I get after typing the 'a' character: "testa" is written and the cursor is after the first "t". Same problem when pasting with Ctrl-V.
Flags: needinfo?(vincent-moz)
The bug actually occurs only when dom.event.clipboardevents.enabled is set to false (for privacy reasons).
Summary: can't paste in Facebook comment fields → can't paste in Facebook comment fields with clipboard events disabled
(In reply to Vincent Lefevre from comment #4) > The bug actually occurs only when dom.event.clipboardevents.enabled is set > to false (for privacy reasons). This sounds like a Facebook bug, then? They should probably be listening for input events as well, if their internal bookkeeping of the state of the comment is getting messed up. I don't know why they specifically listen for paste events.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
OK, I've reported the problem to Facebook.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: