-
Notifications
You must be signed in to change notification settings - Fork 230
(ngSubmit) and (submit) do not prevent default form submit causing a page reload #1891
Comments
@insinfo I understand what you are going through ... I made a comment ... it sucks to see a situation like this ... What ends up happening is having to make a patch, when in fact, the technology that helps me should do her simple job. Several government-level projects are breaking down, and they are going to break down even more. |
in dart version: 2.8.0-dev.14.0 (Thu Mar 12 11:00:10 2020 +0100) on "windows_x64" VM2420 main.dart.js:5430 EXCEPTION: TypeError: Instance of 'SubmitEvent': type 'minified:cg' is not a subtype of type 'minified:k' $1 @ VM2420 main.dart.js:5430 in dart version: 2.9.0-4.0.dev (dev) (Tue Apr 28 09:41:22 2020 +0200) on "windows_x64" |
at angular 6.0.0-alpha+1 with dart 2.7.2 the same problem occurs EXCEPTION: TypeError: Instance of 'cv': type 'cv' is not a subtype of type 'minified:n' $1 @ VM3938 main.dart.js:5251 |
if parameter - -O4 is passed with a custom builder file the problem does not occur build.yaml targets:
$default:
builders:
build_web_compilers|entrypoint:
generate_for:
- web/**.dart
options:
dart2js_args:
#- --no-minify
- -O4
- --minify
|
with --no-minify VM5189 main.dart.js:11057 EXCEPTION: TypeError: Instance of 'UnknownJavaScriptObject': type 'UnknownJavaScriptObject' is not a subtype of type 'Event' |
@insinfo, @thiagosantoscunha it is the same as #1889. Either update to the latest dart 2.8-dev version, or just add the following snippet to alias the SubmitEvent - dart-lang/sdk#40901 (comment). |
@ganigeorgiev |
@ganigeorgiev |
@insinfo Sorry, I'm not sure. I'm using the dart-sdk as zip from here - https://dart.dev/tools/sdk/archive (Linux/Fedora/ - https://storage.googleapis.com/dart-archive/channels/beta/release/2.8.0-20.11.beta/sdk/dartsdk-linux-x64-release.zip). |
@athomas - are the latest dev releases available on chocolatey? |
Re: availability of the releases: So these releases have the fix (on beta it's a cherrypick with a different hash), and the upcoming 2.8.1 stable will also have it:
The easiest is probably to use the latest 2.9 dev release (those are published everywhere as usual). An alternative is to use the 2.8.0-20.11.beta which should also be published everywhere but because it's not the latest unstable release, is sorted weirdly by tooling because the version scheme changed and a beta release you'll have to install specially, see: https://github.com/dart-lang/sdk/wiki/Installing-beta-and-dev-releases-with-brew,-choco,-and-apt-get#installing-and-upgrading-on-windows-with-chocolatey. |
(ngSubmit) and (submit) do not prevent default form submit causing a page reload
(ngSubmit) and (submit) do not prevent default form submit causing a page reload
and causing EXCEPTION TypeError on dart2js
webdev serve --hostname localhost --release
VM3327 main.dart.js:5232 EXCEPTION: TypeError: Instance of 'cp': type 'cp' is not a subtype of type 'minified:n'
STACKTRACE:
TypeError: Instance of 'cp': type 'cp' is not a subtype of type 'minified:n'
at Object.b (http://localhost:8080/main.dart.js:193:3)
at Object.m (http://localhost:8080/main.dart.js:545:48)
at eI.$0 (http://localhost:8080/main.dart.js:5788:34)
at hJ.$0 (http://localhost:8080/main.dart.js:5975:14)
at i9.k4 [as $1$4] (http://localhost:8080/main.dart.js:1066:9)
at b9.cr (http://localhost:8080/main.dart.js:5916:79)
at Object.eval (eval at lf (http://localhost:8080/main.dart.js:333:8), :3:43)
at j0.C (http://localhost:8080/main.dart.js:3472:79)
at j0.W (http://localhost:8080/main.dart.js:3440:10)
at eJ.$1 (http://localhost:8080/main.dart.js:5785:5)
$1 @ VM3327 main.dart.js:5232
$1 @ VM3327 main.dart.js:5984
k5 @ VM3327 main.dart.js:1078
ct @ VM3327 main.dart.js:5926
eval @ VM3359:3
a5 @ VM3327 main.dart.js:3479
aU @ VM3327 main.dart.js:3446
ai @ VM3327 main.dart.js:3356
bU @ VM3327 main.dart.js:3340
ai @ VM3327 main.dart.js:3093
k @ VM3327 main.dart.js:3059
eu @ VM3327 main.dart.js:5944
eval @ VM3351:3
a2 @ VM3327 main.dart.js:3464
W @ VM3327 main.dart.js:3442
$1 @ VM3327 main.dart.js:5785
oj @ VM3327 main.dart.js:266
(anonymous) @ VM3327 main.dart.js:274
Navigated to http://localhost:8080/?
project for reproducer bug
https://github.com/insinfo/angular_form_bug
It works:
Microsoft Edge 44.18362.449.0 Windows 10 64-bit;
Firefox 72.0.2 64-bit Windows 10 64-bit;
Firefox Developer 72.0b5 64-bit Windows 10 64-bit;
Internet Explorer 11.657.18362.0 Windows 10 64-bit
Safari 5.1.7 (7534.57.2) Windows 10 64-bit
Google Chrome iphone 6S ios 13.3.1
Google Chrome Linux Ubuntu 18
Google Chrome Android 9
Does not work:
New Microsoft Edge 81.0.416.64 Windows 10 64-bit
Google Chrome 81.0.4044.122 64-bit Windows 10 64-bit
Brave 1.7.98 Chromium: 81.0.4044.113 64-bit Windows 10 64-bit
Opera 68.0.3618.63 Windows 10 64-bit
Vivaldi 3.0.1874.33 64-bit Windows 10 64-bit
Firefox 75.0 64bits Linux Ubuntu 18
The text was updated successfully, but these errors were encountered: