Skip to content

Magnify.js enabled always evaluates to true, can't disable it #7534

Closed
@surfer190

Description

@surfer190

There is a specific line config.magnifierOpts.enabled in /lib/web/magnifier/magnify.js.
This will always evaluate to true, unless the magnier option is set like below:

<var name="magnifier">
            <var name="enabled"></var> <!-- Turn on/off magnifier (true/false) -->
        </var>

As it will be a json string of `"false"

Steps to reproduce

Add the following to /etc/view.xml:

        <var name="magnifier">
            <var name="enabled">false</var> <!-- Turn on/off magnifier (true/false) -->
        </var>

Expected result

  1. The zoom should be disabled

Actual result

  1. It isn't disabled

Even if you set the magnifier.enabled to an empty string " ", it will not execute that code but it will still pop the zoom up.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions