-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Dart2's ResizeObserver being broken by Dart minifier #40961
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
Comments
I've just tested this with 2.8.0-dev.13.0 and it's still giving the same error. Had to change the Dart code though seeing as the list is now
|
It seems the error is now with the ResizeObserver inside the loop and no longer the callback itself
it fails at |
Logged a separate issue for ResizeObserverEntry: |
When using ResizeObserver in Dart2 and compiling for release (i'm assuming it uses dart2js), it stops working. Have reproduced this issue in Dart 2.7.
ResizeObserver works when doing a regular webdev serve:
ResizeObserver stops working when building for release:
Test HTML file to reproduce issue:
Test Dart file to reproduce issue:
When doing a regular
webdev serve
, it works fine, when you do a build with release mode, the ResizeObserver stops working. It would seem that minification is breaking it.DevMode working (resizing text area and the blue div resizes as well):
Release Mode not working (resizing text area and the blue div does nothing and errors appear in the console):
I've documented in a lot of detail the problem here and all the workarounds i've tried without success:
https://stackoverflow.com/questions/60620940/dart2s-resizeobserver-being-broken-by-dart-minifier
The text was updated successfully, but these errors were encountered: