🐛 Chrome IFrame Crash Bug

Minimal reproduction for a Chrome tab crash caused by nested event handling in iframes

⚠️ Expected Behavior

Pressing Enter in the iframe below will crash the Chrome tab with "Aw, Snap!" error. Mouse clicking works fine - only keyboard events trigger the crash.

📋 Test Instructions
  1. The button in the iframe below should be auto-focused
  2. Press Enter key (or Space)
  3. Chrome tab will crash immediately 💥
  4. Compare: Reload and click with mouse - works fine ✓
🔍 Technical Details
Event Chain:
1. User presses Enter on button in iframe
2. btn.onkeypress handler fires
3. Handler calls window.parent.hide() directly
4. Parent removes iframe with iframe.remove()
5. Try to return to keypress handler
💥 CRASH! Document no longer exists