"show parent" after submitting reply #414

Closed
MarkTraceur opened this Issue Apr 13, 2012 · 0 comments

Comments

Projects
None yet
2 participants

Generally: When I reply to a comment in my inbox, then (after the reply is in the DOM) click "show parent", I get two copies of the parent comment. One is in the right place, the other is where I would expect a "show parent" div to be for my reply.

Steps to reproduce:

  1. Get a message
  2. Reply to it and hit "save"
  3. Click on "show parent"
  4. Marvel at the strangeness.

I think I might also have seen this in other situations, but I wasn't paying attention....I'll keep a better eye out.

Hint: Probably there's some jQuery DOM search somewhere that looks like $('.id-t1_sd89fusj parent') that should instead be $('.id-t1_sd89fusj parent').first(), or something similar. Or maybe, there's something happening that I don't even realize.

Anyway, thanks for the help!

shlurbee was assigned Apr 23, 2012

@spladug spladug added a commit that referenced this issue Apr 24, 2012

@spladug shlurbee + spladug Fix multiple parent bug in comment messages
Previously, if you replied to a comment in your inbox, saved it, then clicked
"show parent," the parent would appear multiple times because the dom element
inserted by your reply also matched the jquery selector.

Now .first() is used to make sure only the original parent matches.

(Fixes issue #414 in reddit/reddit)
872bc19

shlurbee closed this Apr 24, 2012

@jzplusplus jzplusplus pushed a commit to jzplusplus/reddit that referenced this issue Jun 28, 2012

@spladug shlurbee + spladug Fix multiple parent bug in comment messages
Previously, if you replied to a comment in your inbox, saved it, then clicked
"show parent," the parent would appear multiple times because the dom element
inserted by your reply also matched the jquery selector.

Now .first() is used to make sure only the original parent matches.

(Fixes issue #414 in reddit/reddit)
d985471

@powerlanguage powerlanguage pushed a commit to powerlanguage/reddit that referenced this issue Oct 14, 2013

shlurbee Fix multiple parent bug in comment messages
Previously, if you replied to a comment in your inbox, saved it, then clicked
"show parent," the parent would appear multiple times because the dom element
inserted by your reply also matched the jquery selector.

Now .first() is used to make sure only the original parent matches.

(Fixes issue #414 in reddit/reddit)
2043acf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment