pinterest / widgets

JavaScript widgets, including the Pin It button.
Other
211 stars 88 forks source link

data-pin-no-hover doesn't work for 'save button' Chrome extension #85

Closed timaikens closed 6 years ago

timaikens commented 6 years ago

Issue: <img> tags with data-pin-no-hover="true" are not supposed to show the save button on hover, but they do.

Example page: https://www.seriouseats.com/2018/04/13-spring-salads-to-say-goodbye-to-winter.html

Using Chrome, version 65.0.3325.181, and Pinterest Save Button extension, version 3.0.81.

timaikens commented 6 years ago

I should note that data-pin-nopin="true" on an <img> tag does work to hide the button, but it also makes the image unable to be pinned at all (or at least when clicking the extension icon in the toolbar).

The desired behavior is that the 'pinit' button does not appear on hover but the image is still able to be pinned (using the extension icon, a custom implementation, etc.).

shawncothran commented 6 years ago

I have the same issue, but it is via the pinit.js script tag loaded on my page

<script
  async
  defer
  data-pin-hover="true"
  src="//assets.pinterest.com/js/pinit.js"
></script>

For some img tags I have set the attribute data-pin-nopin="true" and they do not recieve a hover button, but they are nested in an a tag and no longer trigger normal navigation. Likely a return false, stopPropagation or preventDefault is being used to undo the work of pinit.js and has hijacked the event bubble.

kentbrew commented 6 years ago

This seems to be working; sorry for radio silence!