Opened 8 years ago

Closed 7 years ago

#1392 closed defect (fixed)

too much recursion when setting HTML in fullPage mode using onGenerate/onGenerateOnce

Reported by: guest Owned by: gogo
Priority: normal Milestone: 0.96
Component: Plugins Version: trunk
Severity: normal Keywords:
Cc: adam@…

Description

I'm hooking into the onGenerate event to set the editor content.

I'm trying to set the editors content as soon as it's loaded using:

xinha_config.Events.onGenerateOnce = function ()
{

xinha_editorseditor?.setEditorContent('content');

return true;

}

it "works" but it freezes the browser and causes this error:

Error: too much recursion
Source File: XinhaCore?.js
Line: 16

i also tried using onGenerate with the same error.

using FF3

I managed to work-round this issue using setTimeout.

Adam J

Change History (4)

comment:1 Changed 8 years ago by ray

Hi Adam, thanks for your input.

I cannot reproduce this error, could you put up a test case for this?

comment:2 Changed 8 years ago by guest

Hi Ray,

Test case here:
http://lib.shiftcreate.com/dev/ongenerate.php

I just noticed that it's only happening when fullpage is on.

comment:3 Changed 8 years ago by ray

  • Summary changed from too muc recursion using onGenerate onGenerateOnce to too much recursion when setting HTML in fullPage mode using onGenerate/onGenerateOnce

rev [1169] fixes this for onGenerateOnce

comment:4 Changed 7 years ago by gogo

  • Component changed from Xinha Core to Plugins
  • Resolution set to fixed
  • Status changed from new to closed

Closing fixed then. Seems reasonable.

Note: See TracTickets for help on using tickets.