Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@
[#447](https://github.com/nextcloud/cookbook/pull/447) @christianlupus
- Recipe-editing Vue components are not tightly coupled anymore
[#386](https://github.com/nextcloud/cookbook/pull/386/) @seyfeb
- Fixed trying to remove already removed img DOM nodes in image lazyloading, fixes #462
[#463](https://github.com/nextcloud/cookbook/pull/463/) @seyfeb

### Removed
- Travis build system
Expand Down
3 changes: 3 additions & 0 deletions src/components/LazyPicture.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,14 @@ export default {

// callback for fully-loaded image event
const onThumbnailFullyLoaded = () => {
img.removeEventListener('load', onThumbnailFullyLoaded)
el.removeChild(imgPlaceholder)
$this.isLoading = false
}

// callback for preview-image-loaded event
const onThumbnailPreviewLoaded = () => {
imgPlaceholder.removeEventListener('load', onThumbnailPreviewLoaded)
img.addEventListener('load', onThumbnailFullyLoaded)
$this.$once('hook:destroyed', () => {
img.removeEventListener('load', onThumbnailFullyLoaded)
Expand Down