Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2151cc6

Browse files
goldimgoldim
and
goldim
authored
Infinite calls in mobile popup (#10827)
* Added flag which ignores event domupdated caused by this widget and stopps infinite recursive `_updatePosition` calls* Fixed wrong name---------Co-authored-by: goldim <ZolotovDY@ugpa.ru>
1 parent2cc7a87 commit2151cc6

File tree

1 file changed

+13
-1
lines changed
  • source/class/qx/ui/mobile/dialog

1 file changed

+13
-1
lines changed

‎source/class/qx/ui/mobile/dialog/Popup.js‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,16 @@ qx.Class.define("qx.ui.mobile.dialog.Popup", {
140140
__widget:null,
141141
__titleWidget:null,
142142
__lastPopupDimension:null,
143+
/**
144+
* Flag which ignores event domupdated caused by this widget and stopps infinite recursive `_updatePosition` calls
145+
*/
146+
__updatePositionStarted:false,
143147

144148
/**
145149
* Event handler. Called whenever the position of the popup should be updated.
146150
*/
147151
_updatePosition(){
152+
this.__updatePositionStarted=true;
148153
// Traverse single anchor classes for removal, for preventing 'domupdated' event if no CSS classes changed.
149154
varanchorClasses=["top","bottom","left","right","anchor"];
150155
for(vari=0;i<anchorClasses.length;i++){
@@ -446,7 +451,14 @@ qx.Class.define("qx.ui.mobile.dialog.Popup", {
446451
flex:1
447452
});
448453

449-
widget.addListener("domupdated",this._updatePosition,this);
454+
widget.addListener("domupdated",()=>{
455+
if(!this.__updatePositionStarted){
456+
this._updatePosition();
457+
}
458+
else{
459+
this.__updatePositionStarted=false;
460+
}
461+
},this);
450462

451463
this.__widget=widget;
452464
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp