Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magnifier doesn't work with mode set to inner #4977

Closed
theycallmepepper opened this issue Jun 10, 2016 · 14 comments
Closed

Magnifier doesn't work with mode set to inner #4977

theycallmepepper opened this issue Jun 10, 2016 · 14 comments
Assignees
Labels
Area: Frontend bug report Event: WroCD Contribution day in Wro Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@theycallmepepper
Copy link

This appears to be the original library that was ported over magnifier.js which offers the option of setting mode to 'inside' for an in-frame zoom.

In the etc/view.xml for the theme if you set the following the zoom does not work as expected:
<var name="magnifier"> <var name="mode">inside</var> <var name="eventType">hover</var> <var name="enabled">true</var> </var>
Instead of an in-frame zoom the lens does not appear. If you change mode back to outside it functions as expected.

Also,
https://github.com/magento/magento2/blob/develop/lib/web/magnifier/magnifier.js#L214 --unreachable if statement.

@guz-anton
Copy link
Contributor

Hi @theycallmepepper
We will do investigation under MAGETWO-55440 internal ticket.

Thanks for pointing to issue.

@vkorotun vkorotun removed the CS label Aug 4, 2016
@MomotenkoNatalia MomotenkoNatalia added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels Sep 6, 2016
@guz-anton guz-anton removed their assignment Oct 13, 2016
@minhluan259
Copy link

I've enabled magnifier zoom in
vendor\magento\theme-frontend-luma\etc\view.xml
I'm notice it doesn't work on
magento 2.1.2 with sampledata (php 7.0.10, mysql 5.7)

       <var name="magnifier">
            <var name="fullscreenzoom">5</var>  <!-- Zoom for fullscreen (integer)-->
            <var name="top"></var> <!-- Top position of magnifier -->
            <var name="left"></var> <!-- Left position of magnifier -->
            <var name="width"></var> <!-- Width of magnifier block -->
            <var name="height"></var> <!-- Height of magnifier block -->
            <var name="eventType">hover</var> <!-- Action that atcivates zoom (hover/click) -->
            <var name="enabled">true</var> <!-- Turn on/off magnifier (true/false) -->
        </var>

@LSERRE
Copy link

LSERRE commented Apr 14, 2017

I also notified this issue. I found a quick fixe for it: just set left to 0 and top to 0 and use default mode.

@artlesshand
Copy link

Any updates on this issue?

@lingwooc
Copy link

I've patched/replaced a couple of files in this module. The important bits are the css and the js which you could just throw in your theme (here). It also makes the magnifier work on touch screen laptops which it rather naively disables normally.

@LSERRE IIRC you also need a tweak to make sure a click on the now magnified image gives you a "fullscreen" view (assuming you have that enabled). That's in the module above as well.

@artlesshand
Copy link

Thanks @lingwooc

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Area: Frontend Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@theycallmepepper, thank you for your report.
We've created internal ticket(s) MAGETWO-55440 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Oct 23, 2017
@magento-engcom-team magento-engcom-team added the Event: distributed-cd Distributed Contribution Day label Mar 19, 2018
@magento-engcom-team magento-engcom-team removed the Event: distributed-cd Distributed Contribution Day label Apr 13, 2018
@lingwooc
Copy link

lingwooc commented May 3, 2018

Master branch of https://github.com/lingwooc/overlayMagnify-magento2 is updated to work with 2.2.4 which broke it.

Bit more detail.

The mouse out detection only works if you move slowly so magnifier.js needs:

function onMouseLeave(e) {
	onThumbLeave();
	isOverThumb = false;
	$largeWrapper.addClass(MagnifyCls.magnifyHidden);
}
$box.on('mouseleave', onMouseLeave);

This rule fixes the overlay, the new rule is pointer-events.

.magnifier-preview{
	top: 0px !important;
	left: 0px !important;
	width: 100% !important;
	height: 100% !important;
	margin-bottom: 0px;
	pointer-events: none;
}

I did have a look through to see what had changed and I couldn't see much to cause this. These two changes fix it though. I'll do a 1.1.0 release on that module to packagist at some point.

I'm aware I could do a PR on this but I don't have the time to test it.

@dmanners dmanners added the Event: WroCD Contribution day in Wro label May 18, 2018
@kacperchara
Copy link

#WroCD

@magento-engcom-team
Copy link
Contributor

@kacperchara thank you for joining. Please accept team invitation here and self-assign the issue.

@kacperchara kacperchara self-assigned this May 18, 2018
@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label May 27, 2018
@magento-engcom-team
Copy link
Contributor

Hi @theycallmepepper. Thank you for your report.
The issue has been fixed in #15382 by @kacperchara in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.5 release.

@leoquijano
Copy link

@magento-engcom-team
Copy link
Contributor

Hi @theycallmepepper. Thank you for your report.
The issue has been fixed in #17052 by @torhoehn in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jul 25, 2018
@leoquijano
Copy link

For anyone interested, this one seems to be in place for the 2.2.6 release.

magento-engcom-team pushed a commit that referenced this issue Nov 6, 2019
[EngCom][Combined] Inventory Stabilization + GraphQl + SSL MySql + DBC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend bug report Event: WroCD Contribution day in Wro Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests