diff --git a/mail/js/app.js b/mail/js/app.js index 9ca2b9193f..d3cf24a5f2 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2438,10 +2438,18 @@ app.classes.mail = AppJS.extend( // we can NOT query global object manager for this.nm_index="nm", as we might not get the one from mail, // if other tabs are open, we have to query for obj_manager for "mail" and then it's child with id "nm" var obj_manager = egw_getObjectManager(this.appname).getObjectById(this.nm_index); + let tree = this.et2.getWidgetById('nm[foldertree]'); var that = this; var rvMain = false; if ((obj_manager && _elems.length>1 && obj_manager.getAllSelected() && !_action.paste) || _action.id=='readall') { + // Avoid possibly doing select all action on not desired mailbox e.g. INBOX + for (let n=0;n<_elems.length;n++) + { + // drop the action if there's a mixedup mailbox found in the selected messages + if (atob(_elems[n].id.split("::")[3]) != tree.getSelectedNode().id.split("::")[1]) return; + } + if (_confirm) { var buttons = [