Skip to content

Detached DOM images get loaded when they shouldn't #229

@grololo06

Description

@grololo06

Hi,
We (https://github.com/oceanomics/ecotaxa_dev) reload part of a page using JQuery elem.html() with the output of an Ajax call. This part of the page contains up to 1000 images, so of course we use Lazy to load them only when needed.
We saw that, after reload, the (then detached) old DOM continued to trigger image loads from server.
The main cause being that _isInLoadableArea() always returns true for detached elements (getBoundingClientRect() returns 0 for all properties).
We chose to cure the problem by issuing proper .destroy() calls before DOM patching but I leave this issue here for the records, in case it helps someone.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions