Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting an event should close the modal dialog #558

Open
2 of 7 tasks
Aggtaa opened this issue Apr 24, 2024 · 1 comment
Open
2 of 7 tasks

Deleting an event should close the modal dialog #558

Aggtaa opened this issue Apr 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Aggtaa
Copy link

Aggtaa commented Apr 24, 2024

Please check that this issue hasn't been reported before.

  • I searched previous Bug Reports and didn't find any similar reports.

Expected Behavior

When a user opens an event from the calendar view, a modal dialog with buttons labeled "Save Event" and "Delete Event" pops up.

Clicking the "Delete Event" button should delete the event and then immediately close the modal dialog

Current behaviour

Clicking the "Delete Event" button deletes the event, but leaves the dialog open.

This brings two problems:

  1. The dialog is left useless.
  2. Clicking the "Save Event" after the event deletion renders error "Error when updating event: Event ID # is not present in event store"

JavaScript console output

No response

Steps to reproduce

  1. Open the calendar week view.
  2. Click the calendar to create an event. Give it a title and save.
  3. See the event created
  4. Click the event, click the "Delete Event" button in the modal dialog.
  5. Error

Calendar information

Full Calendar for Obsidian v0.10.7, daily notes calendar.

Which Operating Systems are you using?

  • macOS
  • Windows
  • Linux
  • Android
  • iOS

Obsidian Version

1.5.12

Full Calendar Plugin Version

0.10.7

Checks

  • I have tried it with all other plugins disabled and the error still occurs.

Possible solution

No response

Comments

No response

@Aggtaa Aggtaa added the bug Something isn't working label Apr 24, 2024
@AlgebraicFloat
Copy link

AlgebraicFloat commented Aug 16, 2024

Go into your hidden .obsidian folder (use Command Shift . to access hidden folders), then go to /.obsidian/plugins/obsidian-full-calendar/main.js. Scroll down to line 63742 (or use command f and search "Error when deleting". Finally, add this one line:

deleteEvent: () => __async(this, null, function* () {
try {
yield plugin.cache.deleteEvent(eventId);
} catch (e3) {
if (e3 instanceof Error) {
new import_obsidian6.Notice("Error when deleting event: " + e3.message);
console.error(e3);
}
}
closeModal(); // Add This Line.
})
});

Should do the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants