[Files] Fix image intersection observer behavior#143843
Merged
jloleysens merged 8 commits intoelastic:mainfrom Oct 25, 2022
Merged
[Files] Fix image intersection observer behavior#143843jloleysens merged 8 commits intoelastic:mainfrom
jloleysens merged 8 commits intoelastic:mainfrom
Conversation
…sures the intersection observer will fire
Contributor
|
Pinging @elastic/kibana-app-services (Team:AppServicesUx) |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
To update your PR or re-run it, just comment with: |
Dosant
approved these changes
Oct 25, 2022
Contributor
Dosant
left a comment
There was a problem hiding this comment.
Tested, works well!
Example app looks nice!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Occasionally the observer does not fire with a "visible" event for the image tag. This happened because the img tag was placed below the blurhash and could be pushed out of view in a component with overflow hidden (as is the case in the file picker #143111). The result (see screenshot) is that the image can get "stuck" on the blurhash.
This PR makes the image tag appear "on top" of the blurhash so that when the container is scrolled into view it will render correctly.
Original context: https://github.com/elastic/kibana/pull/143111/files#r999145694
Also removes the "lazy" option from the
Imagecomponent since it should, preferably, always load lazily.How to reproduce the issue
On main
--run-examplesThe issue