Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging image into wiki pages is broken #5650

Closed
jywarren opened this issue May 2, 2019 · 8 comments · Fixed by #5703
Closed

Dragging image into wiki pages is broken #5650

jywarren opened this issue May 2, 2019 · 8 comments · Fixed by #5703
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute high-priority JavaScript

Comments

@jywarren
Copy link
Member

jywarren commented May 2, 2019

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

@jywarren jywarren added bug the issue is regarding one of our programs which faces problems when a certain task is executed high-priority help wanted requires help by anyone willing to contribute JavaScript labels May 2, 2019
@jywarren
Copy link
Member Author

jywarren commented May 2, 2019

Yes! It's the same as this: #5229 (comment)

@publiclab-mimi
Copy link
Collaborator

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.

@steviepubliclab
Copy link
Contributor

Same issue here on /air-quality

@publiclab-mimi
Copy link
Collaborator

publiclab-mimi commented May 10, 2019 via email

@jywarren
Copy link
Member Author

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:

var len = $E.textarea.val().length;

It's initialized here:

$E.initialize({})

@jywarren
Copy link
Member Author

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.

jywarren added a commit to jywarren/plots2 that referenced this issue May 10, 2019
@jywarren
Copy link
Member Author

Filed a fix, which I tested, at #5703!

@jywarren
Copy link
Member Author

Thanks, all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute high-priority JavaScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants