mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 05:29:13 +01:00
Add a check for invalid position preference.
This happens if the user has switched to a window smaller than previous, where their preference is now invalid. Fixes splitter at top when viewing mail in smaller window.
This commit is contained in:
parent
73523fbecc
commit
a7a1474229
@ -185,11 +185,15 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable],
|
|||||||
{
|
{
|
||||||
var pref = this.egw().preference('splitter-size-' + this.id, this.egw().getAppName());
|
var pref = this.egw().preference('splitter-size-' + this.id, this.egw().getAppName());
|
||||||
if(pref)
|
if(pref)
|
||||||
|
{
|
||||||
|
if(this.orientation == "v" && pref['sizeLeft'] < this.dynheight.outerNode.width() ||
|
||||||
|
this.orientation == "h" && pref['sizeTop'] < this.dynheight.outerNode.height())
|
||||||
{
|
{
|
||||||
options = $j.extend(options, pref);
|
options = $j.extend(options, pref);
|
||||||
this.prefSize = pref[this.orientation == "v" ?'sizeLeft' : 'sizeTop'];
|
this.prefSize = pref[this.orientation == "v" ?'sizeLeft' : 'sizeTop'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Avoid double init
|
// Avoid double init
|
||||||
if(this.div.hasClass(options.splitterClass))
|
if(this.div.hasClass(options.splitterClass))
|
||||||
|
Loading…
Reference in New Issue
Block a user