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

aposudevsky created an issue. See original summary.

aldibier’s picture

StatusFileSize
new576 bytes

Thanks @aposudevsky, your solution works like a charm!, I've created a patch with your changes.

aldibier’s picture

Status: Active » Needs review
fls-pcate’s picture

Patch #2 worked for me on dev version.

aleevas’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new97.31 KB

Hello
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

naveenvalecha’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x-2.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.