New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing onLoad and onError events on SVG <image> tag #5626
Comments
+1 to add this handler |
+1 |
1 similar comment
+1 |
If you’re interested in this, could you please send a PR? Yes I think |
@gaearon I'm gonna try this. |
simple fix + test, but still few other SVG events are missing
I've commited PR which adds onLoad and onError events to SVG, but we are still missing few others like onUnload, onResize, onScroll, onZoom etc. Thank you @gaearon for mentioning correct file name. |
|
@mdogadailo that doesn't seem to have affected |
This was resolved by #9042 🍾 |
@aweary seems that onLoad event is not getting dispatched on IE11 (it is supported) |
(Let's track that in #11058) |
+1 |
SVG
<image>
is supposed as far as I know to support at least the same onload and onerror events<img>
supports.From looking at React code the events are handled on specific elements in
ReactDOMComponents.js
intrapBubbledEventsLocal, mountComponent, unmountComponent
.It would be easy to create a pull request to add 'image' to these cases, but it seems that there is a separation between js files that handle DOM and SVG in the codebase that this might collide with.
Am I correct and there is more to it than just adding more cases? Or these functions are the right place to also handle SVG image?
The text was updated successfully, but these errors were encountered: