colorbox icon indicating copy to clipboard operation
colorbox copied to clipboard

Conflict with the Click Listener of Google Tag Manager

Open pantaluna opened this issue 8 years ago • 2 comments

Hi, I have followed your advice at #739 and made a small reproducible case. All irrelevant things have been stripped.

If you click on a Colorbox enabled anchor link when the page (or image?) is in the cache then the image-url is opened in the browser tab/window, so only the image is shown. The normal behaviour is that the Colorbox overlay is displayed and the clicked image is shown in it.

System: IE11 on Windows 7. Google Chrome evergreen (v43 v44) on Windows 7.

Scenario:

  1. Open an incognito window in the browser.
  2. Open http://www.feestdagen-belgie.be/tmp90210/tmp-20150716/cb.php
  3. Save it as a bookmark.
  4. Try the colorbox anchors and they will work fine. Screenshot: https://dl.dropboxusercontent.com/u/5629939/temp/capture_20150716_180228.jpg
  5. Open the bookmark, e.g. open the page again. PS Do not reload/refresh the page because then the things are not taken from the browser cache and it will work fine.
  6. Click on one of the colorbox anchors. Now the image opens very briefly in the Colorbox overlay but... very quickly the image-url is opened "full screen" in the browser. Screenshot: https://dl.dropboxusercontent.com/u/5629939/temp/capture_20150716_180257.jpg

Remarks:

  • If you disable the browser cache then it works correctly.
  • Problem occurs in IE11 and Google Chrome for Windows 7. Firefox works fine all the time.
  • The browser console reports this but I do not know it is related (I'm sure the http headers of the image are correct though): "Resource interpreted as Document but transferred with MIME type image/jpeg"

Thanks for your time.

pantaluna avatar Jul 27 '15 12:07 pantaluna

I am having a similar issue on a drupal site with colorbox and Google Tag Manager. Removing Google Tag Manager resolved the issue. The issue only appeared for me using Chrome. Clicking on the image the for first time, after a F5 cache flush, the image would not load in colorbox. It would just display the image. Pressing the back button (closing the image) and clicking on the image a second time, the image would load in color box. If I had a devel tools window open and clicked on the image after a cache flush the image would load in colorbox. Close the devel tools window and the issue resurfaced. -- weird behavior.

lperepol avatar Oct 15 '15 23:10 lperepol

It is good to know I'm not the only person seeing this issue. I have not found a solution since I reported it.

pantaluna avatar Oct 16 '15 09:10 pantaluna