| Page 1 of 1 | [ 2 posts ] |
Khoa Bui
|
I had a problem using event simulation on Firefox, although it works fine on Chrome and Safari.
The scenario is that: There is a 'Select File' button, and a hidden input[type='file'] control. Once the button is clicked, the 'click' event is simulated on input[type='file'] control, the open file dialog appear. On Firefox, the open file dialog does not appear. Please see the example on jsFiddle: http://jsfiddle.net/khoaminhbui/bayrc/ |
Marco AsbreukYUI Contributor
|
Hey Khoa,
I'm not sure if it's a bug. You should be careful when simulating actions that normally would be done by userinteraction. I think firefox doesn't allow you to do that. But I'm not sure. More about this: http://yuilibrary.com/yui/docs/event/simulate.html#faking I suggest you make a function (or a widget that shows up) that uses 'Uploader'. Nice is to descent Y.panel and create your own uploader. Both the form as well as your simulation could show this widget, select a file and insert the response int your inputnode. (for progressive enhancement, you could use the upload-button in the original way, and have javascript add a e.preventdefault to it) Kind Regards, Marco. |
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group