mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-28 21:48:13 +08:00
fix(hippy-react-web): event.path is not supported for safari
This commit is contained in:
@@ -148,7 +148,8 @@ export class Image extends React.Component {
|
||||
isLoadSuccess: true,
|
||||
});
|
||||
if (onLoad) {
|
||||
const imageInfo = e.path[0];
|
||||
const path = e.path || (e.composedPath && e.composedPath());
|
||||
const imageInfo = path[0];
|
||||
onLoad({
|
||||
width: imageInfo.naturalWidth,
|
||||
height: imageInfo.naturalHeight,
|
||||
|
||||
Reference in New Issue
Block a user