File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { HAS_INTERACTION_OBSERVER_SUPPORT } from '../../constants/env'
4
4
import { MODEL_EVENT_NAME_PREFIX } from '../../constants/events'
5
5
import { PROP_TYPE_BOOLEAN , PROP_TYPE_NUMBER_STRING , PROP_TYPE_STRING } from '../../constants/props'
6
6
import { concat } from '../../utils/array'
7
+ import { requestAF } from '../../utils/dom'
7
8
import { identity } from '../../utils/identity'
8
9
import { toInteger } from '../../utils/number'
9
10
import { omit } from '../../utils/object'
@@ -113,7 +114,11 @@ export const BImgLazy = /*#__PURE__*/ Vue.extend({
113
114
// If IntersectionObserver is not supported, the callback
114
115
// will be called with `null` rather than `true` or `false`
115
116
if ( ( visible || visible === null ) && ! this . isShown ) {
116
- this . isShown = true
117
+ // In a `requestAF()` to render the `blank` placeholder properly
118
+ // for fast loading images in some browsers (i.e. Firefox)
119
+ requestAF ( ( ) => {
120
+ this . isShown = true
121
+ } )
117
122
}
118
123
}
119
124
} ,
You can’t perform that action at this time.
0 commit comments