shariff icon indicating copy to clipboard operation
shariff copied to clipboard

No twitter popup when twitter feed is embedded in the page

Open mishac opened this issue 6 years ago • 5 comments

This appears to be the opposite of this issue https://github.com/heiseonline/shariff/pull/201

In that issue the twitter popup opened twice when twitter's widget.js was loaded in the page. We're having an issue where no twitter popup comes up when the twitter button is clicked. I'm not sure if it's related or not.

mishac avatar Sep 13 '18 17:09 mishac

I am having this same issue. Twitter-feed and twitter-share-button on the same page. Click the twitter button. nothing happens.

The twitter-share-button works fine on other pages without twitter-feeds.

srich3 avatar May 16 '19 18:05 srich3

It really seems that PR #201 caused that issue after it has been merged.

@Nebel54 as the author of PR #201 : Any idea on how to fix that?

richard67 avatar May 21 '19 19:05 richard67

I just gave it a try with a vanilla shariff integration: https://codepen.io/anon/pen/zQpxwr?editors=1111 and the pop-up works as expected. Do you see any errors in you Javascript-Console? Can you send an example link where the problem appears?

Nebel54 avatar May 22 '19 08:05 Nebel54

Have the same problem on a Drupal 8 site with Shariff contrib module integration. Found out that the problem is that Drupal integration is adding additional JS code that is preventing propagation on click event to document root and then twitter widget JS event handling code will not be triggered resulting in no Twitter popup widget shown. I guess this code was added to prevent duplicate popups and now integration does not work because of https://github.com/heiseonline/shariff/pull/201 fix.

This is already fixed in the latest dev version of Drupal shariff integration in https://www.drupal.org/node/3108089.

If you are running a custom integration then make sure that no JS code is preventing propagation of click event on twitter share button.

pivica avatar Jul 15 '20 15:07 pivica

One additional thing about this. It seems that twitter button with twitter widget is now opening in a new tab instead of a popup. Sounds more like a follow-up, just want to report it here.

pivica avatar Jul 16 '20 13:07 pivica