Closed Bug 549132 Opened 14 years ago Closed 14 years ago

middle-mouse paste fails in text input field if it is empty and does not have focus

Categories

(Core :: Layout: Form Controls, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.9.3a3
Tracking Status
blocking2.0 --- final+

People

(Reporter: elmar.ludwig, Assigned: mounir)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a2pre) Gecko/20100227 Minefield/3.7a2pre ID:20100227031019

Using middle click to insert the current selection fails for input fields that do not have focus and are empty. If the field has focus or contains any text prior to the paste, middle-mouse paste works fine.

Steps to reproduce:

1. load any page containing text input form controls, for example
   http://www.mcfedries.com/CreatingAWebPage/textarea.htm
2. select some text on the page
3. try to paste using middle-click into an empty text field

Expected behaviour:
selected text is inserted into the text field

Actual behaviour:
no text is unserted

Regression range:

firefox-3.7a2pre-2010-02-26-03: works
firefox-3.7a2pre-2010-02-27-03: fails

http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=475768f37b1a&tochange=4e1b68ecf126

-> bug 457800
The placeholder frame is taking the event preventing the other frame to take it. I will attach a patch tomorrow.
Thank you for reporting.
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attached patch Patch v0.1 (obsolete) — Splinter Review
This patch is fixing the bug.
Attachment #429401 - Flags: review?(bzbarsky)
Blocks: 549170
So does this work because the anonymous div background is always transparent?  I thought we'd put the placeholder on top to make sure it was visible.
Indeed. But is it possible to have a non-transparent value div as it is anonymous ? 
We may be able to do this in css with "pointer-events: none;". Would you prefer this solution ?
You should make the placeholder element click-through: 'pointer-events: none;'.
Attached patch Patch v0.2Splinter Review
This patch sets the pointer-events to none for the placeholder div.
Attachment #429401 - Attachment is obsolete: true
Attachment #429514 - Flags: review?(bzbarsky)
Attachment #429401 - Flags: review?(bzbarsky)
Comment on attachment 429514 [details] [diff] [review]
Patch v0.2

Yeah, I like this a lot more.  Shouldn't have as many surprises.
Attachment #429514 - Flags: review?(bzbarsky) → review+
Thank you for your review.
blocking2.0: --- → ?
Keywords: checkin-needed
Landed as <http://hg.mozilla.org/mozilla-central/rev/f5bc344b91a6>

Let's get some tests for this as well.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite?
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a2
Target Milestone: mozilla1.9.3a2 → mozilla1.9.3a3
Flags: in-testsuite? → in-testsuite+
blocking2.0: ? → final+
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: