Skip to content

Fix resize() method to actually invoke trigger - #1573

Merged
davidjbradshaw merged 3 commits into
devfrom
copilot/sub-pr-1570-another-one
Feb 9, 2026
Merged

Fix resize() method to actually invoke trigger#1573
davidjbradshaw merged 3 commits into
devfrom
copilot/sub-pr-1570-another-one

Conversation

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

The resize() method was creating a bound function but never calling it, making iframe.iframeResizer.resize() a no-op.

Changes

  • packages/core/methods/attach.js: Changed trigger.bind(null, 'Window resize', RESIZE, id) to trigger('Window resize', RESIZE, id) to actually dispatch the resize message

The fix aligns with the pattern used by other methods in the same file (moveToAnchor, sendMessage) which call trigger() directly.

// Before (no-op)
resize() {
  advise(id, DEPRECATED_RESIZE)
  trigger.bind(null, 'Window resize', RESIZE, id)  // Creates function, never calls it
}

// After (working)
resize() {
  advise(id, DEPRECATED_RESIZE)
  trigger('Window resize', RESIZE, id)  // Actually sends the message
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback from review on PR #1570 for V6 changes Fix resize() method to actually invoke trigger Feb 9, 2026
Copilot AI requested a review from davidjbradshaw February 9, 2026 12:00
@davidjbradshaw
davidjbradshaw marked this pull request as ready for review February 9, 2026 14:57
@davidjbradshaw
davidjbradshaw merged commit e2a54b8 into dev Feb 9, 2026
1 check passed
@davidjbradshaw
davidjbradshaw deleted the copilot/sub-pr-1570-another-one branch February 9, 2026 14:57
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