Open
Description
Steps to reproduce
- Just create an
<md-card />
component with media-cover that hasmd-text-scrim
.
Which browser?
Chrome
What is expected?
Has scrim background
What is actually happening?
No background because img.onload
apparently does not get triggered when vising page directly or refreshing the page. It works if you come from a different page.
Demo
https://codesandbox.io/s/l7vpj917wl
Workaround
- Add
ref
to media-cover - add
mounted
hook - check if
covertStyles.background
is type ofobject
- manually invoke
applyScrimColor(0.6)
Or just use md-solid
Tested on firefox and it worked. Also not a CORS issue because I also tried an image from assets
directory.