Oct 08, 2015, 3:55 PM
[FIXED] [#916] [1.x] DocumentReady handler function bug fix
Hi,
The DocumentReady handler function Fn attribute has been a known bug of the ResourceManager object for a while. Would it be possible to provide a bug fix and commit it to the SVN branches? Here's a code patch that was put in place on our end although probably there's a better fix out there:
ResourceManager.cs
The DocumentReady handler function Fn attribute has been a known bug of the ResourceManager object for a while. Would it be possible to provide a bug fix and commit it to the SVN branches? Here's a code patch that was put in place on our end although probably there's a better fix out there:
ResourceManager.cs
internal void RegisterEvents(ResourceManager manager)
{
ResourceManager realManager = manager;
if (manager is ResourceManagerProxy)
{
realManager = this.ResourceManager;
}
if (!manager.Listeners.DocumentReady.IsDefault)
{
string temp = manager.Listeners.DocumentReady.Fn;
if (manager.Listeners.DocumentReady.Handler.IsNotEmpty())
{
temp = manager.Listeners.DocumentReady.Handler;
}
// BEGIN Bug Fix code
if (manager.Listeners.DocumentReady.Fn.IsNotEmpty())
{
temp = string.Format("({0}).call(this);", temp);
}
// END Bug Fix code
realManager.RegisterOnReadyScript(TokenUtils.ReplaceIDTokens(temp, this.Page));
}
}
Last edited by Daniil; Oct 14, 2015 at 1:22 PM.
Reason: [FIXED] [#916] [1.x]