Skip to content

fix: keep event bubbles working after cancelling print - #749

Open
rahulyadav911 wants to merge 1 commit into
mainfrom
fix/print-cancel-event-bubble
Open

fix: keep event bubbles working after cancelling print#749
rahulyadav911 wants to merge 1 commit into
mainfrom
fix/print-cancel-event-bubble

Conversation

@rahulyadav911

@rahulyadav911 rahulyadav911 commented Aug 7, 2026

Copy link
Copy Markdown

Task:: Print Overlay Persists After Cancelling Print Dialog

Description::
Before: Print cloned the calendar with all its tip data (clone(true)), hid the page, then after cancel showed every body child again. That pulled dormant qTip layers back on top of the calendar, so some events stopped responding to hover/click.

After: We clone without that tip data, and we only put back what we actually hid. Tips that were meant to stay hidden stay hidden, so events work again after Cancel.

Touched: assets/js/default-calendar.js

Before:: Link
After:: Link

Summary by CodeRabbit

  • Bug Fixes
    • Improved calendar printing behavior.
    • Preserved the visibility state of page elements after printing.
    • Prevented hidden elements from being unintentionally shown when printing completes.

@rahulyadav911 rahulyadav911 self-assigned this Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The calendar print handler now uses a non-deep clone, preserves hidden body elements, hides only visible non-script elements during printing, and restores their original visibility afterward.

Changes

Calendar print workflow

Layer / File(s) Summary
Preserve visibility during calendar printing
assets/js/default-calendar.js
The print handler tracks visible non-script body children, hides them during printing, removes the temporary clone, and restores only the elements that were previously visible.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: akhill2020

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: preserving event bubbles after cancelling the print dialog.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/print-cancel-event-bubble

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@assets/js/default-calendar.js`:
- Around line 419-424: Update the print cleanup sequence after window.print() in
the calendar print handler to remove the simcal-print-calendar class from body
before restoring $divToPrint and $toHide. Preserve the existing clone removal
and hidden-element restoration behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9aff498d-cc3a-4056-b920-4a55c810fd7c

📥 Commits

Reviewing files that changed from the base of the PR and between f9d1789 and eaf02ae.

📒 Files selected for processing (1)
  • assets/js/default-calendar.js

Comment thread assets/js/default-calendar.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants