#234: Microsoft Asp.net 2.0 AJAX UpdatePanel Bug
-------------------------------+--------------------------------------------
Reporter: Anksunamon | Owner: fredck
Type: Bug | Status: assigned
Priority: Normal | Milestone: FCKeditor 2.6.3
Component: Server : ASP.Net | Version: FCKeditor 2.4
Resolution: | Keywords: Confirmed HasPatch
-------------------------------+--------------------------------------------
Comment(by serializer):
FredCK's patch is better in that it doesn't require an extra .js include -
which my AJAX solution does. However in terms of architecture, it's
bringing ASP.NET-specific code into the fckeditor core, breaking the usual
separation of the server-specific implementions as separate components
from the core editor.
Another concern is that the _onSubmitStatements object is an internal
feature of PageRequestManager which *could* be subject to change in future
releases, since it's not publicly specified or documented. (Unlikely I
admit, but a potential gotcha...)
Another problem would be if a different Javascript framework decided to
name something Sys.WebForms.PageRequestManager... again very unlikely but
would cause unexpected problems!
A further problem I'm not sure about, is what would happen if the
fckeditorapi code ran *before* the PageRequestManager had loaded?
Personally I don't know enough about the Javascript pipeline in different
browsers to know how possible this is. Basically, are scripts *guaranteed*
to be executed in the order that they are referenced in the page, or are
they just executed as soon as they're downloaded?
The other test case I outlined (comment 35) could be easily worked around
by using the endRequest event of the PRM, there re-attaching our onsubmit
event in case it has been deleted during the async operation. This might
not even be necessary, I should have some time tomorrow to test this.
Here's the official PageRequestManager reference:
[http://www.asp.net/ajax/documentation/live/ClientReference/Sys.WebForms/PageRequestManagerClass/default.aspx
ASP.NET Documentation]
It's pretty annoying that there's no publicly-exposed way to attach a
submit event. "beginRequest" and "initializeRequest" only seem to be
triggered for async postback, but we need something that will be triggered
for ordinary (synchronous) postbacks as well. So the only way officially
endorsed is via the server-side RegisterOnSubmitStatement method, pretty
strange for a client-side framework!
The following note is at the end of the PRM reference:
"This class contains private members that support the client-script
infrastructure and are not intended to be used directly from your code.
Names of private members begin with an underscore ( _ )."
So _onSubmitStatements is considered dangerous territory... but on the
other hand, it works!
--
Ticket URL: <http://dev.fckeditor.net/ticket/234#comment:42>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac