GithubHelp home page GithubHelp logo

Comments (12)

corinadev avatar corinadev commented on June 26, 2024

Giving this._expandedRowCol a default value of -1 fixes this issue for me. On line 114, when the property is unset, it should then also be set to -1 instead of deleting it.

from dojo-calendar.

damiengarbarino avatar damiengarbarino commented on June 26, 2024

Hi ucorina,

Could you provide me with a reproducing sample?

Using your fix is breaking the default demo and I am not able to reproduce
your issue.

Thanks

Damien

On Fri, Oct 3, 2014 at 3:41 PM, Corina [email protected] wrote:

Giving this._expandedRowCol a default value of -1 fixes this issue for
me. On line 114, when the property is unset, it should then also be set to
-1 instead of deleting it.


Reply to this email directly or view it on GitHub
#102 (comment)
.

from dojo-calendar.

corinadev avatar corinadev commented on June 26, 2024

Hello Damien,

I tried to reproduce this by modifing the default test (tests/calendar.html) but indeed, I couldn't reproduce.

I did notice instead that in my case the height of the secondary sheet comes as 0 when the page is loaded (line 78, ColumnViewSecondarySheet.js). I thought this was normal since my calendar is displayed in a dijit/Dialog, however after adding the demo calendar to a Dialog, I still couldn't reproduce.

if(!this.expandRenderer || this._expandedRowCol == -1){
    return;
}
var h = domGeometry.getMarginBox(this.domNode).h; // This is 0 in my case ..
if(this._defaultHeight == -1){
    this._defaultHeight = h; // .. so the default height is set to 0 first time this code is executed ..
}

// after the Dialog is displayed, _defaultHeight is 0, height is != 0, which means I enter the first branch of the if ...
if(this._defaultHeight != -1 && this._defaultHeight != h && h >= this._getExpandedHeight() ||
    this._expandedRowCol !== undefined && this._expandedRowCol !== -1){
    var col = this._expandedRowCol;
    if(col >= this.renderData.columnCount){
        col = 0;
    }
    this._layoutExpandRendererImpl(0, col, null, true);
}else{
// ... instead of the second, the way the code in the default test gets executed
    this.inherited(arguments);
}

Not sure what to do next, I guess I'll have to find a fix in my code :)

from dojo-calendar.

damiengarbarino avatar damiengarbarino commented on June 26, 2024

ucorina,

What are the values of all the variables involved in this 'if' test?
_defaultHeight = 0 is not enough as if _defaultHeight == h, it does not
enter in the 'if'...

Damien

On Mon, Oct 6, 2014 at 2:26 PM, Corina [email protected] wrote:

Hello Damien,

I tried to reproduce this by modifing the default test
(tests/calendar.html) but indeed, I couldn't reproduce.

I did notice instead that in my case the height of the secondary sheet
comes as 0 when the page is loaded (line 78, ColumnViewSecondarySheet.js).
I thought this was normal since my calendar is displayed in a dijit/Dialog,
however after adding the demo calendar to a Dialog, I still couldn't
reproduce.

if(!this.expandRenderer || this._expandedRowCol == -1){
return;}var h = domGeometry.getMarginBox(this.domNode).h; // This is 0 in my case ..if(this._defaultHeight == -1){
this._defaultHeight = h; // .. so the default height is set to 0 ..}
// .. which means I enter the first branch of the if ...if(this._defaultHeight != -1 && this._defaultHeight != h && h >= this._getExpandedHeight() ||
this._expandedRowCol !== undefined && this._expandedRowCol !== -1){
var col = this._expandedRowCol;
if(col >= this.renderData.columnCount){
col = 0;
}
this._layoutExpandRendererImpl(0, col, null, true);}else{// ... instead of the second, the way the code in the default test gets executed
this.inherited(arguments);}

Not sure what to do next, I guess I'll have to find a fix in my code :)


Reply to this email directly or view it on GitHub
#102 (comment)
.

from dojo-calendar.

corinadev avatar corinadev commented on June 26, 2024

The code gets executed twice: first time, when the page is loaded, the height is 0 - since the calendar is not visible yet (Dialog hidden) - and second time after the Dialog is displayed, when calendar becomes visible and the height is no longer 0.

I updated my previous code comments to make this more clear.

from dojo-calendar.

damiengarbarino avatar damiengarbarino commented on June 26, 2024

Ok, so the problem is that the default height is not initialized correctly at first pass not second one.
This should be fixed in the first "if" IMHO:
if(this._defaultHeight == -1 || this._defaultHeight === 0)
Please try in your environment if it fixes the issue.

from dojo-calendar.

corinadev avatar corinadev commented on June 26, 2024

I just tested it in my environment and indeed, it does fix my issue.

from dojo-calendar.

damiengarbarino avatar damiengarbarino commented on June 26, 2024

Ok, I will change that in the lib.

Thanks,

from dojo-calendar.

corinadev avatar corinadev commented on June 26, 2024

Thanks a lot for your help!

from dojo-calendar.

damiengarbarino avatar damiengarbarino commented on June 26, 2024

Fixed in master, 1.10, 1.9

from dojo-calendar.

monnu avatar monnu commented on June 26, 2024

Hi I am suffering from the same error. TypeError: Cannot read property 'ownerDocument' of null.
But I am unable to recognize what value its taking null because the file in which its showing the error is generated file.Could you please guide me how to recognize what value its taking null.I

from dojo-calendar.

monnu avatar monnu commented on June 26, 2024

var visualTreeTab = new ContentPane ({
id: "visualTreeTab",
title: "<s:message code="visualTree.header">/s:message",
content: "visualTree Details..."}, "visualTreeTab");

           contentTabs.addChild(visualTreeTab);    

After removing this "content: "visualTree Details..." line from the code I am getting that error.
Is it related to some dojo content pane .How to recognize where its showing the null value because its showing in some generated file.
Please guide me.

from dojo-calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.