Open Bug 903787 Opened 11 years ago Updated 2 years ago

Popup blocker blocks file upload window triggered by keyup events

Categories

(Firefox :: General, defect)

23 Branch
x86_64
Windows 7
defect

Tracking

()

People

(Reporter: frank, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36

Steps to reproduce:

With JavaScript I tried to open the native file upload window from an onkeyup event using the onclick event of the file input. To reproduce:

1. Go to http://jsfiddle.net/Phally/g2vkb/4/
2. Click inside the Name input.
3. Hit the tab key.


Actual results:

The window was blocked by the popup blocker and Firefox showed the message that it had blocked it. When I allowed that domain, the window worked normally. The same action on the onclick event works fine.


Expected results:

The window should have just opened, because it isn't a malicious window. The script works fine in IE8-10 and Chrome. I expected the window to be whitelisted and opened similarly to when you click that File input.
Component: Untriaged → General
Reproducible on:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:26.0) Gecko/20100101 Firefox/26.0

Not reproducible on:
Mozilla/5.0 (X11; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reproducible on:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0
Reproducible on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0

I miss old Opera - I never had any unwanted popups with it. Moved to Firefox and I'm bombarded by popups everywhere I go, even though I have popup blocking enabled. Now on top of it being useless, it actually breaks file uploading. WTF?

Why aren't you fixing huge issues like this instead of modifying the skin in every release?
Similarly, I created a Web page with two buttons(`file upload` which is hidden and another button input which triggered the hidden `file input` button) and one text input. The file upload button was triggered when visible input button or text input was clicked using javascript's onclick attribute. When the text input attribute was changed from onclick to onfocus, instead of popping file upload prompt window, Firefox pops up a bar stating popup is blocked.

Why does it show popup blocked error with onfocus attribute instead of File Upload prompt whereas it worked fine with onclick attribute?
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.