diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index 6bcac7fd3e..a6e008fe16 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -525,7 +525,7 @@ var et2_nextmatch = /** @class */ (function (_super) { this.controller.deleteRow(uid); } // Select & focus next row - if (next && next.id) { + if (next && next.id && !this.options.disable_selection_advance) { this.controller._selectionMgr.setSelected(next.id, true); this.controller._selectionMgr.setFocused(next.id, true); } @@ -2337,6 +2337,12 @@ var et2_nextmatch = /** @class */ (function (_super) { "description": "Disable the ability to autorefresh the nextmatch on a regular interval. ", "default": false }, + "disable_selection_advance": { + "name": "Disable selection advance", + "type": "boolean", + "description": "If a refresh deletes the currently selected row, we normally advance the selection to the next row. Set to true to stop this.", + "default": false + }, "view": { "name": "View", "type": "string", diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index 70974d7a96..e645ab8f48 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -189,6 +189,12 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 "description": "Disable the ability to autorefresh the nextmatch on a regular interval. ", "default": false }, + "disable_selection_advance": { + "name": "Disable selection advance", + "type": "boolean", + "description": "If a refresh deletes the currently selected row, we normally advance the selection to the next row. Set to true to stop this.", + "default": false + }, "view": { "name": "View", "type": "string", @@ -817,7 +823,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 } // Select & focus next row - if(next && next.id) + if(next && next.id && !this.options.disable_selection_advance) { this.controller._selectionMgr.setSelected(next.id, true); this.controller._selectionMgr.setFocused(next.id, true); diff --git a/mail/templates/default/index.xet b/mail/templates/default/index.xet index 5173de5450..f103f5ccd0 100644 --- a/mail/templates/default/index.xet +++ b/mail/templates/default/index.xet @@ -4,7 +4,7 @@