Opened 11 years ago

Closed 3 years ago

#1487 closed defect (fixed)

Disco Bug in Stylist Plugin - activateEditor()

Reported by: guest Owned by:
Priority: normal Milestone: 0.97
Component: Plugins Version: trunk
Severity: normal Keywords: Stylist activateEditor


Hi there,

We're using Xinha in our CMS and found a strange bug in stylist plugin. If more than one Xinha is included in a document and you activate the first one an then, very short after that, the second textarea, then you get what we call a disco. The editors toolbars alternatingly activate and deactivate.

User Interface is unusable until you click several times into one of the textareas. This occures in Xinha 0.96beta2 with stylist included.

I could reproduce this inside our CMS and in a local environment.

Change History (6)

comment:1 Changed 11 years ago by guest

  • Component changed from Xinha Core to Plugins
  • Owner gogo deleted

comment:2 in reply to: ↑ description Changed 11 years ago by guest

Solved the problem. Adding a simple else statement in Stylist.js solves the issue:


console.log('onUpdateToolbar aufgerufen. TimeoutID : '+this._timeoutID); if(this.dialog){

console.log('clearTimeout() aufgerufen. '+this._timeoutID); window.clearTimeout(this._timeoutID)

} else { // this is the new statement var a=this.editor; this._timeoutID=window.setTimeout(function(){a._fillStylist()},250); console.log('Neues Timeout gesetzt. ID : '+this._timeoutID); }





comment:3 in reply to: ↑ description Changed 11 years ago by guest

Sorry, left the debbuging output inside, hear's the clean version :

	} else {
	var a=this.editor;

comment:4 Changed 11 years ago by guest

Sorry, this fix will break Stylist.

comment:5 Changed 10 years ago by gogo

  • Milestone changed from 0.96 to 0.97

comment:6 Changed 3 years ago by gogo

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

[1349] - Issue would happen if you activate (click into) first editor and then before the styles are filled (within a second) click into the next editor setting up a race.

Note: See TracTickets for help on using tickets.