Replacing an image in the create modal isn't working.
The bug only occurs immediately after a "New Image" upload. Replacing the source file of an existing image works.
I spend ~30 minutes on this today and had no luck. I tried reseting the input value to null, and also removing all existing data before invoking $input.fileupload again. I also tried unbinding and rebinding the listeners. I never see the $.fileupload's start method fire after the first time.
I'll be able to prioritize it again after a meeting tomorrow morning.
Got a hunch. Peeking.
On Tue, May 24, 2016 at 5:04 PM, Matthew Coppola [email protected] wrote:
I spend ~30 minutes on this today and had no luck. I tried reseting the input value to null, and also removing all existing data before invoking $input.fileupload again. I also tried unbinding and rebinding the listeners. I never see the $.fileupload's start method fire after the first time.
I'll be able to prioritize it again after a meeting tomorrow morning.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe/issues/463#issuecomment-221391919
*THOMAS BOUTELL, *DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com
This is fixed, please review #564
For reasons having to do with fallback support for IE9 and other browsers that don't support the new file upload APIs, jquery fileupload replaces the input element with a new clone each time. This breaks our code for clicking the true file input button when our more aesthetically pleasing fake button is clicked. More precisely, our code clicks the old input element, which is still in the world but no longer hooked up to any plumbing. Solved by always finding it anew from the fieldset in the click handler.
Merged PR, closing!