Skip to content

Conversation

VanRooyHenri
Copy link

Problem

The AJAX interception functionality fails when the web content is loaded in an iframe context, causing captcha and other AJAX-dependent features to break. This occurs because the FLAG_VARIABLE is not properly referenced to the top window context.

Solution

  • Added window reference pattern: var w = (window.top == null || window.top === window) ? window : window.top;
  • Updated FLAG_VARIABLE assignment to use top window context: w.FLAG_VARIABLE = true;
  • Ensures AJAX interception works consistently in both main window and iframe contexts

Impact

  • Fixes captcha functionality in iframe scenarios
  • Maintains backward compatibility with existing implementations
  • Follows security best practices for iframe context handling
  • No breaking changes to the public API

Connection with issue(s)

Resolve issue #???

Connected to #???

Testing and Review Notes

Screenshots or Videos

To Do

  • double check the original issue to confirm it is fully satisfied
  • add testing notes and screenshots in PR description to help guide reviewers
  • request the "UX" team perform a design review (if/when applicable)

…arios

## Problem
The AJAX interception functionality fails when the web content is loaded in an iframe context, causing captcha and other AJAX-dependent features to break. This occurs because the FLAG_VARIABLE is not properly referenced to the top window context.

## Solution
- Added window reference pattern: `var w = (window.top == null || window.top === window) ? window : window.top;`
- Updated FLAG_VARIABLE assignment to use top window context: `w.FLAG_VARIABLE = true;`
- Ensures AJAX interception works consistently in both main window and iframe contexts

## Impact
- Fixes captcha functionality in iframe scenarios
- Maintains backward compatibility with existing implementations
- Follows security best practices for iframe context handling
- No breaking changes to the public API
@probot-autolabeler probot-autolabeler bot added iOS macOS macOS platform labels Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

iOS macOS macOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant