Discovered in
LPP-4175:
I've managed to narrow this one down. It's a problem with calling LzFocus.setFocus() on something outside the viewable canvas area in DHTML. Try running the following test case in DHTML:
<canvas width="400" height="600">
<view width="${canvas.hat.expanded ? 265 : 390}" x="5" height="550"
y="5" bgcolor="0x00FF00">
<button width="10" height="10" x="30" y="30">
<handler name="onclick">
canvas.hat.setAttribute('expanded', !canvas.hat.expanded);
</handler>
</button>
</view>
<view name="hat" width="120" x="400" height="550" y="5" bgcolor="0xFF00FF">
<attribute name="expanded" type="boolean" value="false"/>
<handler name="onexpanded">
if(this.expanded == true){
this.slideit.doStart();
} else {
this.slideback.doStart();
}
LzFocus.setFocus(this.focustext);
</handler>
<edittext name="focustext" width="${parent.width - 20}" x="10" text="Focus on me."/>
<animator name="slideit" attribute="x" from="400" to="280" duration="5000" start="false"/>
<animator name="slideback" attribute="x" from="280" to="400" duration="5000" start="false"/>
</view>
</canvas>
Clicking the button will, for some reason, shift the visible canvas area over to whatever is being focused on off-canvas. The culprit in this case (the Calendar) was:
LzFocus.setFocus(summary.content.title);
Commenting this line out resulted in no weird shifting in the app. Weird...