When I go to sharethis configuration I see two lists of services, because js is executed twice.
Drupal.behaviors.shareThisForm = {
attach: function (context) {
stlib_picker.setupPicker(jQuery('#myPicker'), drupalSettings.sharethis.service_string_markup, drupal_st.serviceCallback);
drupal_st.addEvents();
drupal_st.setupServiceText();
}
};
it's about this code in sharethis.form.js, if I add 'context' like this,
Drupal.behaviors.shareThisForm = {
attach: function (context) {
stlib_picker.setupPicker(jQuery('#myPicker', context), drupalSettings.sharethis.service_string_markup, drupal_st.serviceCallback);
drupal_st.addEvents();
drupal_st.setupServiceText();
}
};
it works fine.
Can you please check and fix this?
Comments
Comment #2
aldibierThanks @aposudevsky, your solution works like a charm!, I've created a patch with your changes.
Comment #3
aldibierComment #4
fls-pcate commentedPatch #2 worked for me on dev version.
Comment #5
aleevasHello
In my case i see this block service 3 times.
The patch #2 works fine on 8.x-2.x-dev version.
I think, It needs to be move to next release.
Thanks
Comment #7
naveenvalechaCommitted and pushed to 8.x-2.x