@bobfrankston/msger 0.1.97 → 0.1.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
@@ -82,6 +82,28 @@
82
82
 
83
83
  console.log('[MSGER] API initialized successfully! window.msger =', window.msger);
84
84
 
85
+ // Keyboard event handlers to ensure F11 and Escape work in external URLs
86
+ // Use capture phase to intercept BEFORE the page's JavaScript can block them
87
+ document.addEventListener('keydown', function(e) {
88
+ // F11 - prevent page from blocking it
89
+ if (e.key === 'F11') {
90
+ console.log('[MSGER] F11 key detected - ensuring it reaches native handler');
91
+ // Stop other handlers (including page's JS) from interfering
92
+ e.stopImmediatePropagation();
93
+ // The native window handler will receive this event
94
+ return;
95
+ }
96
+
97
+ // Escape - prevent page from blocking it
98
+ if (e.key === 'Escape') {
99
+ console.log('[MSGER] Escape key detected - ensuring it reaches native handler');
100
+ // Stop other handlers from interfering
101
+ e.stopImmediatePropagation();
102
+ // The native window handler will receive this event
103
+ return;
104
+ }
105
+ }, true); // CRITICAL: Use capture phase to run BEFORE page's handlers
106
+
85
107
  // Context menu - commented out for now, F11/F12 keyboard shortcuts work fine
86
108
  /*
87
109
  (function() {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/msger",
3
- "version": "0.1.97",
3
+ "version": "0.1.99",
4
4
  "description": "Fast, lightweight, cross-platform message box - Rust-powered alternative to msgview",
5
5
  "type": "module",
6
6
  "main": "./index.js",