Problem/Motivation

The intersection observer polyfill should only be loaded if lazy loading is checked. However, the settings are not correctly read when deciding to embed the library, causing it to be embedded when it should not be.

Steps to reproduce

Enable a google map display in a field formatter. Save the settings with lazy loading enabled. Turn off the lazy loading. Visit the page. The polyfill is still included.

Proposed resolution

The right nested key set by the settings form should be read.

Remaining tasks

Applying the change to a release.

User interface changes

None

API changes

None

Data model changes

None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yareckon created an issue. See original summary.

itamair’s picture

Status: Needs review » Fixed

Thanks @yareckon, nice catch!
Merging MR !17 ... going to deploy a new 3.0.18 release with this fix/update.

  • itamair committed b93c209b on 3.0.x authored by yareckon
    Issue #3458531 by yareckon, itamair: Loading the polyfill intersection...
cpatrone’s picture

@itamair Thanks for your quick fixes but I see in the commit 1bdbd542 from above a link reported as malicious was inserted. Please check polyfill-service page. You will see a big banner saying

This repository contains malicious content that may cause technical harms.

Probably this patch #11 from issue 3456704 is safer.

itamair’s picture

thanks @CPatrone ... but don't worry, I made sure that
this embedded (and frozen) /js/polyfill/polifillIntersectionObserver.min.js file is the minified matching the one provided with Fastly.io: https://polyfill-fastly.io/v3/polyfill.min.js?features=IntersectionObserver

I added a latest commit that makes all this more clear: https://git.drupalcode.org/project/geofield_map/-/commit/8d4d20ecd286a0a...

If you are able to test with IE 11 you also will evidence of that.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.