Ticket #920 (closed Bug: fixed)

Opened 7 years ago

Last modified 5 years ago

Editor text erased on history navigation (Opera)

Reported by: hallvord@… Owned by:
Priority: Normal Milestone: Opera Compatibility
Component: General Version:
Keywords: Confirmed Cc:

Description (last modified by hallvord@…) (diff)

  • load another site by typing in the address bar or choosing a bookmark
  • go back

Bug: your modifications are lost.

Proposal: tell Opera to use "fast" history navigation. It means the entire DOM and the user's changes will be preserved. See http://www.opera.com/support/search/view/827/

To be exact, the code to add to FCKEditor would be

if(typeof history.navigationMode != 'undefined')history.navigationMode='fast';

Change History

comment:1 Changed 7 years ago by hallvord@…

  • Description modified (diff)

comment:2 Changed 7 years ago by fredck

  • Priority changed from High to Normal

I've added that code to the fckeditor.html page and it worked to fix the bug. But, other things stopped working. The toolbar combos were not opening anymore (Oh no! Again!).

comment:3 Changed 7 years ago by hallvord@…

Interesting. Do you have any onunload handlers that might modify something that would stop the toolbar from working, like removing event handlers on unload?

comment:4 Changed 7 years ago by fredck

We use onunload handlers only on IE, for the usual memory leak cleanup.

Everything seams to work well, only "painel" related things are impacted, like the toolbar combos, the toolbar color selectors and the context menu.

This is the error thrown when opening a toolbar combo:

JavaScript - http://dev.fckeditor.local/fckeditor_styles/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default
Event thread: click
Error:
name: TypeError
message: Statement on line 227: Cannot convert undefined or null to Object
Backtrace:
  Line 227 of linked script http://dev.fckeditor.local/fckeditor_styles/editor/_source/classes/fckpanel.js
    		this._IFrame.contentWindow.focus() ;
  Line 356 of linked script http://dev.fckeditor.local/fckeditor_styles/editor/_source/classes/fckspecialcombo.js: In function FCKSpecialCombo_OnClick
    		oPanel.Show( 0, this.offsetHeight, this ) ;
  ...

And this for the color selectors:

JavaScript - http://dev.fckeditor.local/fckeditor_styles/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default
Event thread: click
Error:
name: TypeError
message: Statement on line 227: Cannot convert undefined or null to Object
Backtrace:
  Line 227 of linked script http://dev.fckeditor.local/fckeditor_styles/editor/_source/classes/fckpanel.js
    		this._IFrame.contentWindow.focus() ;
  Line 55 of linked script http://dev.fckeditor.local/fckeditor_styles/editor/_source/commandclasses/fcktextcolorcommand.js
    	this._Panel.Show( panelX, panelY, relElement ) ;
  Line 78 of linked script http://dev.fckeditor.local/fckeditor_styles/editor/_source/classes/fcktoolbarpanelbutton.js: In function FCKToolbarPanelButton_OnButtonClick
    	FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oButton.CommandName ).Execute( 0, e.offsetHeight - 1, e ) ; // -1 to be over the border
  Line 89 of linked script http://dev.fckeditor.local/fckeditor_styles/editor/_source/classes/fcktoolbarbuttonui.js
    			this._FCKButton.OnClick( this._FCKButton ) ;
  ...

This one is for the context menu instead:

JavaScript - http://dev.fckeditor.local/fckeditor_styles/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default
Event thread: mouseup
Error:
name: Error
message: WRONG_ARGUMENTS_ERR

The context menu error is quite strange, but the other two errors point to this._IFrame.contentWindow.focus(). I have the impression that there is some issues on saving the state of the floating IFRAME we use for the panels.

comment:5 Changed 7 years ago by alfonsoml

  • Cc alfonso@… removed

comment:6 Changed 7 years ago by fredck

  • Owner fredck@… deleted

comment:7 Changed 7 years ago by w.olchawa

  • Keywords Confirmed added

comment:8 Changed 7 years ago by hallvord@…

This issue exists in other browsers too. I would still like it resolved for Opera, to prevent dataloss for the user as much as possible.

I suggest you add the code to set navigationMode again, try to make sure you set it in all windows, and let me investigate the problems with the floating panels.

comment:9 Changed 5 years ago by fredck

  • Status changed from new to closed
  • Resolution set to fixed

It looks like this one is now working well with Opera 10 and Firefox 3.5. Still an issue with IE8, Safari 3 and Chrome.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy