Plots2: Drag and drop feature of comment editor does not work properly when editing a comment

Created on 23 Oct 2020  路  17Comments  路  Source: publiclab/plots2

When a file is uploaded using drag and drop feature it gets added in different text box.

Steps to reproduce bug :

  • Add file in comment box using drag and drop (Don't post new comment just add the file)

    • Try editing any existing comment, the file will get added in wrong textbox

ezgif com-video-to-gif (8)

JavaScript bug help wanted

All 17 comments

@cesswairimu @jywarren is this something i can take up?

Hi, thanks @urvashigupta7 for opening this, I tested locally and it works fine. @KarenEfereyan could you please check on https://stable.publiclab.org/ could be its fixed but its not deployed yet. If you find the issue on stable you can go ahead. Thanks all

Hi @cesswairimu. I am unable to add images while editing the comment on https://stable.publiclab.org/ . It just shows never-ending uploading

Screenshot from 2020-10-24 18-49-21

Great investigation, thanks @urvashigupta7, would you like to work on this or should @KarenEfereyan give it a try

Great investigation, thanks @urvashigupta7, would you like to work on this or should @KarenEfereyan give it a try

@urvashigupta7 would you like to work on it? Thanks cess

@KarenEfereyan You can try this out 馃槃 Thanks!!

@cesswairimu could you please assign this to me?

@KarenEfereyan You can try this out 馃槃 Thanks!!

I see that you are a competitive programmer. I have been long interested in that. Could you tell me more about it?

Go ahead @KarenEfereyan

@KarenEfereyan You can try this out smile Thanks!!

I see that you are a competitive programmer. I have been long interested in that. Could you tell me more about it?

Sure @KarenEfereyan . I would be happy to help. Let us just connect on twitter, we can discuss about this there.

@cesswairimu @urvashigupta7 things have been tough on my side recently. Can you help me with the solving of this issue?

@urvashigupta7 i'm unable to replicate the issue. I dragged and dropped files several times and afterward went ahead to edit comments and there are no irregularities. Or am i mistaken?

Hi @KarenEfereyan. Edit comment does not work on https://stable.publiclab.org/ but I see edit comment works fine locally. But I am facing the issue I tried to show in the gif above.

Hi @KarenEfereyan. Edit comment does not work on https://stable.publiclab.org/ but I see edit comment works fine locally. But I am facing the issue I tried to show in the gif above.

Oh okay. Thanks so much

Hello all, thank you for investigating and documenting this so carefully. I'm going to edit the title to add some specificity that this is during editing a comment. It may also be different depending on if the edited comment was just made (with no page refresh) or if it was there already, since newly made comments are inserted using JavaScript instead of being built-in at the time the page is prepared by Ruby.

I'm going to mark this as part of the overall Comment Editor project but whoever would like to work on it, i recommend writing a test that very specifically demonstrates this behavior, of editing a comment then drag-and-dropping an image - and to copy and adapt the test from this example:

https://github.com/publiclab/plots2/blob/a23a3f98a1847a4d6b7f241299a98dfa877d66ee/test/system/comment_test.rb#L136-L156

Thank you so much!

and linking to #8775

I'm researching this bug right now, and I can consistently reproduce it. Here are some instructions for those curious:

Steps to Reproduce Bug

  1. Upload an image to the main comment form (at the bottom of page).
  2. Open an edit comment form.
  3. Upload an image to the edit comment form.
  4. The image doesn't end up in edit form (expected behavior). Instead it ends up in the main comment form (actual behavior).

Bug Notes

  • This bug is present in research notes, and questions (not wikis).
  • This bug is also present between an edit comment form, and a 'Reply to this comment' form.

    • ie. you can reproduce it if you follow the instructions above, and replace 'main comment form' with 'Reply to this comment' form.

  • The bug is present regardless of whether or not you upload via select, or drag-and-drop.
  • The bug is present only when an edit comment form is involved.

    • For example, cross-wiring doesn't happen when you upload into the main comment form, then upload into a 'Reply to this comment' form.

I wrote a system test demonstrating this behavior and will open a PR for it shortly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keshavsethi picture keshavsethi  路  3Comments

grvsachdeva picture grvsachdeva  路  3Comments

keshavsethi picture keshavsethi  路  3Comments

bronwen9 picture bronwen9  路  3Comments

milaaraujo picture milaaraujo  路  3Comments