Ticket #413 (closed defect: wontfix)

Opened 8 years ago

Last modified 8 years ago

Proposal: function to help gecko when unhidding the editor

Reported by: didier Belot Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version:
Severity: normal Keywords:
Cc:

Description

With gecko based browser, when Xinha is used in a tabbed form which need to hide the editor, it doesn't works after being visible again.

One solution is to switch it to source mode, then back to html mode, and then it works again.

So, I propose to add a little function to htmlarea.js. Here is a patch for this:

--- src/xinha/xinha/htmlarea.js	2005-07-23 17:18:38.000000000 +0200
+++ js/xinha/htmlarea.js	2005-07-24 21:09:24.000000000 +0200
@@ -2000,6 +2000,14 @@
   }
 };
 
+// helper func for gecko unhidding the editor
+HTMLArea.prototype.geckoUnhide = function() {
+  if(this.is_gecko && this._editMode=='wysiwyg') {
+    this.setMode('textmode');
+    this.setMode('wysiwyg');
+  }
+};
+
 HTMLArea.prototype.setFullHTML = function(html) {
   var save_multiline = RegExp.multiline;
   RegExp.multiline = true;
@@ -5491,4 +5499,4 @@
 }
 
 HTMLArea.init();
-HTMLArea.addDom0Event(window,'unload',HTMLArea.collectGarbageForIE);
\ No newline at end of file.
+HTMLArea.addDom0Event(window,'unload',HTMLArea.collectGarbageForIE);

Change History

Changed 8 years ago by gogo

  • status changed from new to closed
  • resolution set to wontfix

Don't think the core is the place for this.

In any case, the correct method for altering styles (inherited or otherwise) of the editor in gecko is to deactivateEditor() before changing and activateEditor() after changing. This is a bug in gecko.

Changed 8 years ago by didier Belot

In any case, the correct method for altering styles (inherited or otherwise) of the editor in gecko is to deactivateEditor() before changing and activateEditor() after changing. This is a bug in gecko.

Ok. Sorry for not having correctly searched before (#367).

Maybe this can be an entry in the FAQ (such as Browsers bugs and workaround) ?

Note: See TracTickets for help on using tickets.