framework
framework copied to clipboard
Upload component. Unexpected open file dialog in IE
Originally by ocmwdt
http://demo.vaadin.com/sampler-for-vaadin6#ImmediateUpload - in IE when i walk elements by TAB, "Open file" window opens without button click. It is very uncomfortably (for users, not only for devs)!
it's happens only in immediate mode.
Imported from https://dev.vaadin.com/ issue #12606
Originally by Marius R
I can confirm the same behavior still exists in Vaadin 7 as can be seen in the new sampler.
I think it comes from line 59-68 of the VUpload.class inside the onBrowserEvent method:
...
} else if (BrowserInfo.get().isIE()
&& event.getTypeInt() == Event.ONFOCUS) {
// IE and user has clicked on hidden textarea part of upload
// field. Manually open file selector, other browsers do it by
// default.
fireNativeClick(fu.getElement());
// also remove focus to enable hack if user presses cancel
// button
fireNativeBlur(fu.getElement());
}
Maybe adding "&& immediate==false" to the else if statement would be enough but i didn't make any testing in that regard yet.
Related Forum Thread: https://vaadin.com/forum?foo=bar#!/thread/403625
Originally by Marius R
I did a test and changing it to:
...
} else if (BrowserInfo.get().isIE()
&& event.getTypeInt() == Event.ONFOCUS
&& immediate==false) {
...
seems to do the trick. Overriding this yourself is quite difficult as the method is inside a private class which constructor is called in another private method. So replacing the class requires to copy nearly the entire VUpload code to the extension.
Fixing this problem would be much easier then that.
Originally by @Artur-
A lot of tickets have been left hanging in the issue tracker through the years. Some of them are still relevant, some of them have been fixed a long time ago and some are no longer valid. To get a better look on what is important and still relevant, we are closing old tickets which have not been touched in a long time.
No further work will be done on this ticket unless someone indicates that it's still relevant.
If this ticket is still relevant to you, please reopen it.
Originally by lbiczok
This is still relevant, I am using 7.6.3 and can confirm that the problem still exists!
A lot of tickets have been left hanging in the issue tracker through the years. Some of them are still relevant, some of them have been fixed a long time ago and some are no longer valid. To get a better look on what is important and still relevant, we are closing old tickets which have not been touched in a long time. No further work will be done on this ticket. If the ticket seems to be still actual, please verify the problem existence over latest framework version and then open a new ticket in vaadin/framework with all the suitable information.
Vaadin 8.11.0 and issue still relevant. Bump.
Hello there!
We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet.
There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
- Check if the issue is still valid for the latest version. There are dozens of duplicates in our issue tracker, so it is possible that the issue is already tackled. If it appears to be fixed, close the issue, otherwise report to the issue that it is still valid.
- Provide more details how to reproduce the issue.
- Explain why it is important to get this issue fixed and politely draw others attention to it e.g. via the forum or social media.
- Add a reduced test case about the issue, so it is easier for somebody to start working on a solution.
- Try fixing the issue yourself and create a pull request that contains the test case and/or a fix for it. Handling the pull requests is the top priority for the core team.
- If the issue is clearly a bug, use the Warranty in your Vaadin subscription to raise its priority.
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!