Opened 7 years ago

Last modified 7 years ago

#15581 closed defect

Problem with contentpane during the migration to Dojo 1.7.3 — at Version 7

Reported by: Tomasz Bielinski Owned by: Tomasz Bielinski
Priority: undecided Milestone: 1.8
Component: Dijit Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

I have a big problem with the migration of all my projects to Dojo 1.7.3. From version 1.3.2 to version 1.6.1 everything was okay.

I noticed that blame is contentpane- it doesn't work good for me and crash Firefox with Firebug (Firefox 13.0.1 and Firebug 1.9.2). This happens when I change the contents of the contentpane twice.

For example:

<div dojoType="dijit.layout.BorderContainer">
   <div dojoType="dijit.layout.ContentPane" region="top" splitter="false">
        ... There is statick toolbar definition in html ...
   </div>
   <div id="contentWindow" dojoType="dijit.layout.ContentPane" 
region="center" splitter="true"  loadingMessage="Please wait..." 
onShow="content_find();"></div>
</div>

And now, when I first time set the content, everything is okey:

    dijit.byId('contentWindow').set('content', 'bla bla bla bla');

But when I'm trying to put the content second time, it crash:

    dijit.byId('contentWindow').set('content', 'and now dosen't work');

Why is this happening? Can I only set once the content of contentpane since version 1.7?

Change History (9)

comment:1 Changed 7 years ago by bill

Owner: changed from bill to Tomasz Bielinski
Status: newpending

Please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, almost always a single HTML file that we can load in the browser and use to reproduce then problem.

Then, give exact instructions on how to reproduce the problem using your attached test file.

The test case is necessary both to confirm that there's a bug, and for us to be able to debug the problem.

Thanks!

Changed 7 years ago by Tomasz Bielinski

Attachment: dojotest.html added

This file shows the error of ContentPane?

comment:2 Changed 7 years ago by Tomasz Bielinski

Status: pendingnew

Attachment (dojotest.html) added by ticket reporter.

comment:3 in reply to:  2 Changed 7 years ago by Tomasz Bielinski

I added a file that shows the error. When you press the button "Crash Me" browser stops working.

comment:4 Changed 7 years ago by bill

Status: newpending

Can you be more specific? I tried your test case on safari/mac and the "crash me" button refreshes the page, but the browser doesn't crash or stop working.

The reason the page refreshes is because that button is implicitly type="submit", when it should be set explicitly to type="button".

I added the type=button, and converted your test case to AMD so it would be easier to debug, but it seems to be working for me. See attachment.

Changed 7 years ago by bill

Attachment: 15881.html added

seems to be working?

comment:5 in reply to:  4 Changed 7 years ago by Tomasz Bielinski

Status: pendingnew

Replying to bill:

Can you be more specific? I tried your test case on safari/mac and the "crash me" button refreshes the page, but the browser doesn't crash or stop working.

Why don't you tested in Firefox 13.0.1 with Firebug 1.9.2? In the first post I wrote that just for that browser is the problem (although I have not tested other combinations - so now i know that on Safari works okay).

The reason the page refreshes is because that button is implicitly type="submit", when it should be set explicitly to type="button".

Yeah, sorry about that. Hurry while doing the test and I didn't notice this. But Firefox does not refresh the page and for that I missed it.

I added the type=button, and converted your test case to AMD so it would be easier to debug, but it seems to be working for me. See attachment.

I downloaded your attachment and tested. Behaves the same.

After loading the page shows the correct message "please wait ...". And now if I do not have running Firebug (with enabled javascript errors console) and pressed the button "Crash Me" ContentPane? is made ​​clear. But should have the word "blablabla". If I enable Firebug (with active javascript error console) and pressing the "Crash Me" Firefox crashes.

comment:6 Changed 7 years ago by bill

Status: newpending

Oh, sorry, didn't noticed you had mentioned firefox and firebug. Well, on mac they crash constantly for me, even if I'm not using dojo, so if that's the issue it needs to be handled by the firebug developer. On windows it's better.

But I don't understand you test case. It seems invalid. Here's what I see:

  1. The "Crash me" button calls registry.byId('oknoListaModul').set('content', 'blablabla');
  2. That ContentPane has an onShow="moduleFind();" handler. What are you expecting that onShow() handler to do? Isn't onShow() for a ContentPane embedded in a TabContainer, for when the tab is selected?
  3. moduleFind is:
var okno = registry.byId('oknoListaModul');
okno.set('content', okno.get('loadingMessage'));

If okno.set() triggers onShow() to fire, then that causes an infinite loop, right?

Last edited 7 years ago by bill (previous) (diff)

comment:7 Changed 7 years ago by bill

Description: modified (diff)
Note: See TracTickets for help on using tickets.