Comments (12)
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.
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.
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.
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.
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.
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.
I just tested it in my environment and indeed, it does fix my issue.
from dojo-calendar.
Ok, I will change that in the lib.
Thanks,
from dojo-calendar.
Thanks a lot for your help!
from dojo-calendar.
Fixed in master, 1.10, 1.9
from dojo-calendar.
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.
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)
- Crash in column view with expanded top row HOT 1
- Layout of current time indicator is crashing when using non Gregorian calendars (Arabic, Hebrew)
- dojox/calendar: itemClick doesn't fire on some (faster) devices HOT 2
- Time label not displayed
- Error in demo page HOT 2
- Calendar is not refreshed after store is updated HOT 1
- There are two functions named `refreshRendering` in ColumnView.js HOT 1
- always respect dateClassObj when constructing new date objects HOT 1
- Installing dojox with bower is not downloading Calendar HOT 1
- Variable error in MonthColumnView.js HOT 1
- StoreManager does not use the Identity from the item if it is different of "id" HOT 2
- Typo bug at StorageManager
- use dateLocaleModule for all date calculations
- simplecolumnview is not using date-local-module to instantiate date-object
- subColumns and styleGridCell HOT 9
- setting subColumn attribute after instantiation fails HOT 3
- Auto detect today changes HOT 1
- Problem setting the start time of day at initialization HOT 4
- time.newDate does not work with "number" object HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dojo-calendar.