Download & Extend

Share widget appears in wrong location

Project:Share
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

Firefox 3 on Windows seems to be hitting the Drupal.SharePlugin.migrate function too soon. As a result, if the page contains a bunch of images, the widget opens up in the wrong location on the page. I think this is because the code that sets its location is being called before all of the images have loaded.

The solution is to call the positioning code when the user actually clicks on the activation link. See the attached patch.

AttachmentSize
share_widget_link-race-cond.patch782 bytes

Comments

#1

Cool!
Works really great and solves a persistent issue with Share.

To be more explicit the problem with the widget location was happening in IE7, Safari, Chrome and FF, with this patch I have tested that works fine with Safari, Chrome, FF and with IE.

#2

Status:needs review» needs work

I've taken the idea of positioning the popup when the link is clicked but put it in the click function that reveals the popup. I didn't find @Gribnif's patch working for me in the respect that the css positioning wasn't getting applied. Most notably the left style. Although my implementation I'm not too fond of as it currently would fire everytime the link is clicked, even when clicking the link to close the popup.

It's been a while since I've worked with the code, but I believe the positioning functionality is only needed when the Share link is in the node links. So my patch would create additional work for Share links present in the node content or a block.

AttachmentSize
share-positioning-493366-2.patch 1.31 KB
nobody click here