Ensure PersistedElements are refreshed when AuxPanel scrolls
If the screen is not tall enough, AuxPanel starts scrolling its content. If it contains PersistedElements, they need to be notified about scrolling as they only listen on resize events to move their element. Signed-off-by: Pauli Virtanen <pav@iki.fi>
This commit is contained in:
parent
355539feb5
commit
3962c98c9b
1 changed files with 10 additions and 1 deletions
|
@ -141,6 +141,15 @@ export default createReactClass({
|
||||||
return counters;
|
return counters;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onScroll: function(rect) {
|
||||||
|
if (this.props.onResize) {
|
||||||
|
this.props.onResize();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Force refresh of PersistedElements which may be partially hidden */
|
||||||
|
window.dispatchEvent(new Event('resize'));
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
const CallView = sdk.getComponent("voip.CallView");
|
const CallView = sdk.getComponent("voip.CallView");
|
||||||
const TintableSvg = sdk.getComponent("elements.TintableSvg");
|
const TintableSvg = sdk.getComponent("elements.TintableSvg");
|
||||||
|
@ -265,7 +274,7 @@ export default createReactClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AutoHideScrollbar className={classes} style={style} >
|
<AutoHideScrollbar className={classes} style={style} onScroll={this._onScroll}>
|
||||||
{ stateViews }
|
{ stateViews }
|
||||||
{ appsDrawer }
|
{ appsDrawer }
|
||||||
{ fileDropTarget }
|
{ fileDropTarget }
|
||||||
|
|
Loading…
Reference in a new issue