Skip to content

Commit cd7f968

Browse files
committed
Merge pull request '[home] fix bug 75283' (#324) from fix/fix-bugs into release/v9.0.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/desktop-apps/pulls/324
2 parents 693cbfa + 529b935 commit cd7f968

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

common/loginpage/src/model.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ Collection.prototype.add = function(item, suppressevent) {
110110
// if ( !(suppressevent === true) )
111111
// this.events.inserted.notify(m);
112112

113-
$('#' + m.uid).off('click contextmenu')
114-
.on('click', m, this.on_item_click)
115-
.on('contextmenu', m, this.on_item_ctxmenu);
113+
// $('#' + m.uid).off('click contextmenu')
114+
// .on('click', m, this.on_item_click)
115+
// .on('contextmenu', m, this.on_item_ctxmenu);
116116
}
117117

118118
if ( item instanceof Array ) {
@@ -121,13 +121,23 @@ Collection.prototype.add = function(item, suppressevent) {
121121
_add_model(i, true);
122122
});
123123

124-
if ( !(suppressevent === true) )
125-
this.events.inserted.notify(items);
124+
// if ( !(suppressevent === true) )
125+
this.events.inserted.notify(items);
126+
127+
items.forEach(i => {
128+
$('#' + i.uid).off('click contextmenu')
129+
.on('click', i, this.on_item_click)
130+
.on('contextmenu', i, this.on_item_ctxmenu);
131+
});
126132
} else {
127133
_add_model(item)
128134

129-
if ( !(suppressevent === true) )
130-
this.events.inserted.notify(item);
135+
// if ( !(suppressevent === true) )
136+
this.events.inserted.notify(item);
137+
138+
$('#' + item.uid).off('click contextmenu')
139+
.on('click', item, this.on_item_click)
140+
.on('contextmenu', item, this.on_item_ctxmenu);
131141
}
132142
};
133143

0 commit comments

Comments
 (0)