This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 408
Wrapper function doesn't return orignal function's result #667
Comments
zzx88991
changed the title
Wrapper function doesn't return validation result
Wrapper function doesn't return orignal function's result
Mar 9, 2017
@zzx88991 , thank you for posting the issue, I will make a PR to fix it. |
@zzx88991 , I have further question about this one, I am not familiar with ASP.NET, current zone.js implementation just call event.preventDefault when eventHandler return false, so in your code, the form will not submit but you will directly use the eventHandler return value somewhere else, is that right? |
Yes, you are right. The eventHandler is called somewhere else before the the form is submitted. I am just curious why |
@zzx88991 , yes, it should return , I just want to create test case to prove it. |
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Mar 16, 2017
mhevery
pushed a commit
that referenced
this issue
Mar 17, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am using ASP.NET Webform (yeah, it is legacy code..) with
<asp:UpdatePanel>
and<AsyncPostBackTrigger>
.When a button click triggers a async postback,
event.onsubmit
from<form onsubmit="javascript:return WebForm_OnSubmit();">
will be called and return the validation result. However it is not returned oncezone.js
wraps the event handler, resulting the request not passing validation.The source code here shows that the wrapper function doesn't return the result of
https://github.com/angular/zone.js/blob/master/lib/common/utils.ts#L89
Not sure what it the purpose of this code not returning
result
. Thanks for taking a look.The text was updated successfully, but these errors were encountered: