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

Calendar app isn't bring to front when opened from calendar icon #260

Closed
laurentNoudohounsi opened this issue Sep 30, 2024 · 0 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@laurentNoudohounsi
Copy link
Contributor

I noticed that when I click on the calendar button to open the calendar with other applications running (like Safari), the Calendar isn't bring to front and is hidden by other app.

It could be unsettling because user could think the button is not working.

After looking at the code, the issue comes from the Calendar Apple Script:
https://github.com/pakerwreah/Calendr/blob/15bc7bd50aa91cc732289d147a0d481c32fe961c/Calendr/Automation/CalendarScript.swift#L27C1-L32C21

The fix is to add the line activate like this

tell application "Calendar"
    activate
    switch view to \(mode) view
    view calendar at date ("\(formatter.string(from: date))")
end tell

This way, the Calendar app will be opened and brought to front.

@pakerwreah pakerwreah added the bug Something isn't working label Sep 30, 2024
@pakerwreah pakerwreah added this to the v1.13.4 milestone Sep 30, 2024
pakerwreah added a commit that referenced this issue Oct 7, 2024
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