Skip to content

Commit 74523ae

Browse files
authored
Merge pull request #5866 from nextcloud/fix/editor/more-details-sidebar
fix(editor): switching to sidebar after creating a new event
2 parents 2ee671c + c3df245 commit 74523ae

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/views/EditSimple.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,19 @@ export default {
384384
this.$refs.popover.$children[0].$refs.popper.init()
385385
},
386386
/**
387-
* Save changes and return to viewing mode or stay in editing mode if an error occurrs
387+
* Save changes and leave when creating a new event or return to viewing mode when editing
388+
* an existing event. Stay in editing mode if an error occurrs.
388389
*
389390
* @param {boolean} thisAndAllFuture Modify this and all future events
390391
* @return {Promise<void>}
391392
*/
392393
async saveAndView(thisAndAllFuture) {
394+
// Transitioning from new to edit routes is not implemented for now
395+
if (this.isNew) {
396+
await this.saveAndLeave(thisAndAllFuture)
397+
return
398+
}
399+
393400
this.isViewing = true
394401
try {
395402
await this.save(thisAndAllFuture)

0 commit comments

Comments
 (0)