Dragging image into wiki pages is broken
I'm having trouble dragging an image onto a wiki edit page; it returns an error on this line of dragdrop.js:
($D.selected).find('#create_progress').eq(0).show();
Uncaught TypeError: Cannot read property 'find' of undefined
I wonder if $D.selected was affected somehow? This is the kind of thing a system test (#5316) will help prevent!
Noting this could be linked to #5229
Yes! It's the same as this: https://github.com/publiclab/plots2/issues/5229#issuecomment-481370671
I'm currently unable to click to upload or drag an image onto a wiki page. I'm not sure if it's related. I'm not getting an error, just no response no matter how long I let the webpage sit open and "think" about it.
Same issue here on /air-quality
I also tried this post clearing-cache, in a different browser, and on a different computer. Still no image uploading working for me.
On May 10, 2019, at 10:02 AM, Stevie [email protected] wrote:
Same issue here on /air-quality
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/5650#issuecomment-491320842, or mute the thread https://github.com/notifications/unsubscribe-auth/ALUKWT6MJCUVOPHAPUAEDH3PUWE77ANCNFSM4HKB2NQA.
This was fixed in #5657 for comment image uploading, but the fix didn't apply to wiki page image upload. Checking why now; I believe it is failing on $E.wrap in:
// wraps currently selected text in textarea with strings a and b
wrap: function(a,b,args) {
this.refresh();
var len = $E.textarea.val().length;
That's here: https://github.com/publiclab/plots2/blob/a3e40c5cb20e94653de20a74e0ac9553c87f0d3a/app/assets/javascripts/editor.js#L43
It's initialized here:
https://github.com/publiclab/plots2/blob/a3e40c5cb20e94653de20a74e0ac9553c87f0d3a/app/views/editor/_editor.html.erb#L39
Yes!!! This changed, re-assigning $E.textarea to fix reply-to-comment functionality:
https://github.com/publiclab/plots2/pull/5321/files#diff-fd61d47ff16a49707d50fa5f9ae7c5f5R32
We need to make an exemption for wiki image upload.
Filed a fix, which I tested, at #5703!
Thanks, all!