Opened 13 years ago

Closed 12 years ago

#25 closed defect (worksforme)

Doulbing Xinha controls

Reported by: Reg Brehaut <reg@…> Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version: 0.1
Severity: normal Keywords:


In many instances, though not all, my page (containing several Xinha controls) places two Xinhas for each textarea. Here's my code:

just before <form>:

  33: <script type="text/javascript" src="../htmlarea/htmlarea.js"></script>
  34: <script type="text/javascript" src="../htmlarea/dialog.js"></script>
  35: <script type="text/javascript" src="../htmlarea/lang/en.js"></script>

just after </form>:

 414: <script type="text/javascript">
 415: HTMLArea.init();
 416: HTMLArea.onload = function()
 417:   {
 418:   var ed_fullpage_longtext1 = new HTMLArea("fullpage_longtext1");
 419:    ed_fullpage_longtext1.config.toolbar= [
 420:      ['copy','cut','paste','separator','undo','redo', 'separator','removeformat','killword', 'separator','htmlmode','showhelp']
 421:      ];
 422:     ed_fullpage_longtext1.config.width='600';
 423:     ed_fullpage_longtext1.config.pageStyle='body { background-color: whitesmoke; color: black; font-family: verdana; font-size: 1em;' ;
 424:     ed_fullpage_longtext1.generate();
 425:   var ed_fullpage_longtext2 = new HTMLArea("fullpage_longtext2");
 426:    ed_fullpage_longtext2.config.toolbar= [
 427:      ['copy','cut','paste','separator','undo','redo', 'separator','removeformat','killword', 'separator','htmlmode','showhelp']
 428:      ];
 429:     ed_fullpage_longtext2.config.width='600';
 430:     ed_fullpage_longtext2.config.pageStyle='body { background-color: whitesmoke; color: black; font-family: verdana; font-size: 1em;' ;
 431:     ed_fullpage_longtext2.generate();
 432:   var ed_fullpage_longtext20 = new HTMLArea("fullpage_longtext20");
 433:    ed_fullpage_longtext20.config.toolbar= [
 434:      ['copy','cut','paste','separator','undo','redo', 'separator','removeformat','killword', 'separator','htmlmode','showhelp']
 435:      ];
 436:     ed_fullpage_longtext20.config.width='600';
 437:     ed_fullpage_longtext20.config.pageStyle='body { background-color: whitesmoke; color: black; font-family: verdana; font-size: 1em;' ;
 438:     ed_fullpage_longtext20.generate();
 439:   }
 440: </script>

Usually, clicking on the browser's Refresh button causes it to display correctly.

I'll attach a couple of screen captures

Is this a bug, a problem with IE6, or something I'm doing wrong?


Attachments (2)

doublexinhaclosed.jpg (96.8 KB) - added by Reg Brehaut <reg@…> 13 years ago.
2 text areas, 2 Xinhas each
doublexinhaopen.jpg (97.5 KB) - added by Reg Brehaut <reg@…> 13 years ago.
Showing underlying Xinha

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by Reg Brehaut <reg@…>

2 text areas, 2 Xinhas each

Changed 13 years ago by Reg Brehaut <reg@…>

Showing underlying Xinha

comment:1 Changed 13 years ago by gogo

I have never seen this happen before. Do you have a URL to an example showing this problem?

comment:2 Changed 13 years ago by Reg Brehaut <reg@…>

Don't know whther this will provide sufficinet data for you as it is a saved page:

My app creates pages dynamically, and to get to any page one has to be logged into the site (and it is my client's site) so I have saved a page that does not show the button graphics but does exhibit the behaviour. Sometimes it shows two controls per textarea and sometimes only one

If there is more I can do or provide, I'd be happy to


comment:3 Changed 13 years ago by gogo

  • Severity changed from critical to normal

Can you provide a smaller testcase please (the one you provide doesn't seem to work, at least not in Gecko). I believe it's probably a problem in your HTML (not necessarily a bug in your HTML, but probably a browser bug getting triggered by something).

comment:4 Changed 12 years ago by reg@…

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

Still don't know why, but now I know how:

apparently the code coming after the form is sometimes run twice -- it causes a clicking sound in my speakers and I can hear it click once for each control on the page, and then do it again. But only sometimes, and I do not know why only sometimes

However, I have moved the code into a function and called that function in the Onload event (just like it says in the documentation) and the problem seems to have gone away.

So I have changed the Action to Resolve (best choice in the 'As' dropdown seemed to be Worksforme, but maybe you want to change that)



Note: See TracTickets for help on using tickets.