Jump to content

Strange images duplication problem


plb

Recommended Posts

Hi,

 

I have an issue in my shop www.weglow.pt when I mouseover any image, those image appear reapeted in botton of page. You can try it to understand.

 

I know that's not a template problem because it happens in both templates.

 

I'm using last version PS 1.6.1.4 Can you help me?

Link to comment
Share on other sites

Somewhere, in a JS file, you have this:

        $('img').on('mouseenter touchstart', function(e) {
            var img = $(this);
            var pos = img.offset();
            var overlay = $('<img class="protectionOverlay" src="' + pixelSource + '" width="' + img.width() + '" height="' + img.height() + '" />').css({
                position: 'absolute',
                zIndex: 9999999,
                left: pos.left,
                top: pos.top
            }).appendTo('body').bind('mouseleave', function() {
                setTimeout(function() {
                    overlay.remove();
                }, 0, $(this));
            });
            var link = img.closest('a');
            if (link.length > 0)
                overlay.wrap(link.clone());
            if ('ontouchstart' in window)
                $(document).one('touchend', function() {
                    setTimeout(function() {
                        overlay.remove();
                    }, 0, overlay);
                });
        });

As your JS is packed, impossible to tell you were it exactly comes from (theme or module).

IMO, "mouseenter" is abusive...

 

EDIT: Maybe not, as "mouseleave" is then captured.

Anyway, I think it is the source of your issue.

Edited by erouvier29 (see edit history)
Link to comment
Share on other sites

 

Somewhere, in a JS file, you have this:

        $('img').on('mouseenter touchstart', function(e) {
            var img = $(this);
            var pos = img.offset();
            var overlay = $('<img class="protectionOverlay" src="' + pixelSource + '" width="' + img.width() + '" height="' + img.height() + '" />').css({
                position: 'absolute',
                zIndex: 9999999,
                left: pos.left,
                top: pos.top
            }).appendTo('body').bind('mouseleave', function() {
                setTimeout(function() {
                    overlay.remove();
                }, 0, $(this));
            });
            var link = img.closest('a');
            if (link.length > 0)
                overlay.wrap(link.clone());
            if ('ontouchstart' in window)
                $(document).one('touchend', function() {
                    setTimeout(function() {
                        overlay.remove();
                    }, 0, overlay);
                });
        });

As your JS is packed, impossible to tell you were it exactly comes from (theme or module).

IMO, "mouseenter" is abusive...

 

EDIT: Maybe not, as "mouseleave" is then captured.

Anyway, I think it is the source of your issue.

 

SOLVED

 

The problem was a feature in a content protetion module.

 

Thank you erouvier29

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...