Closed (fixed)
Project:
Image Caption
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2011 at 18:24 UTC
Updated:
20 Nov 2014 at 19:57 UTC
Jump to comment: Most recent
Comments
Comment #1
davidwhthomas commentedThanks for the bug report. I've seen similar issues before on other modules.
It occurs because the drupal.behavior function is run after each js-triggered DOM change.
This is good, if for example the image is added via javascript/ajax and you want it captioned, but not so good in this case where the caption in duplicated.
I'll add a 'caption-processed' class to images already captioned, and check that in the js, which will prevent this occurring.
Comment #2
bryancasler commentedCouldn't you save the extra class and just check for "image-caption-container". Not that it matters, but I was just wondering if there is another reason to do the previous vs the latter.
Comment #3
davidwhthomas commentedSomething to that effect would also suffice however the Drupal convention seems to be to use a foo-processed class for such instances.
Comment #4
bryancasler commentedthanks for letting me pick your brain
Comment #5
davidwhthomas commented@animelion, I've added the caption-processed support to a new beta3 release, please update, test and confirm working for you too, thanks.
Comment #6
bryancasler commentedWorks like a charm.
Comment #7
rooby commentedSeems fixed to me.
Comment #10
balazsgabi commentedI have downloaded the latest stable version (7.x-2.8) and I found that also. After closing overlay and the page of refresh disappear the multiplicates.
update: sorry this irrelevant here, I am confusioned in my browser tabs. Consider to be superfluous.