ep_data_tables 0.0.4 → 0.0.5
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.
- package/package.json +1 -1
- package/static/js/client_hooks.js +9 -10
package/package.json
CHANGED
|
@@ -66,14 +66,13 @@ let isAndroidChromeComposition = false;
|
|
|
66
66
|
let handledCurrentComposition = false;
|
|
67
67
|
// Suppress all beforeinput insertText events during an Android Chrome IME composition
|
|
68
68
|
let suppressBeforeInputInsertTextDuringComposition = false;
|
|
69
|
-
// Helper to detect Android
|
|
70
|
-
function
|
|
69
|
+
// Helper to detect any Android browser (exclude iOS/Safari)
|
|
70
|
+
function isAndroidUA() {
|
|
71
71
|
const ua = (navigator.userAgent || '').toLowerCase();
|
|
72
72
|
const isAndroid = ua.includes('android');
|
|
73
73
|
const isIOS = ua.includes('iphone') || ua.includes('ipad') || ua.includes('ipod') || ua.includes('crios');
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return isAndroid && !isIOS && !isFirefox && isChromiumFamily;
|
|
74
|
+
// Safari on Android is rare (WebKit ports), but our exclusion target is iOS Safari; we exclude all iOS above
|
|
75
|
+
return isAndroid && !isIOS;
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
// ─────────────────── Reusable Helper Functions ───────────────────
|
|
@@ -2196,7 +2195,7 @@ exports.aceInitialized = (h, ctx) => {
|
|
|
2196
2195
|
// log(`${deleteLogPrefix} Current line number: ${lineNum}. Column start: ${selStart[1]}, Column end: ${selEnd[1]}.`);
|
|
2197
2196
|
|
|
2198
2197
|
// Android Chrome IME: collapsed backspace/forward-delete often comes via beforeinput
|
|
2199
|
-
const isAndroidChrome =
|
|
2198
|
+
const isAndroidChrome = isAndroidUA();
|
|
2200
2199
|
const inputType = (evt.originalEvent && evt.originalEvent.inputType) || '';
|
|
2201
2200
|
|
|
2202
2201
|
// Handle collapsed deletes on Android Chrome inside a table line to protect delimiters
|
|
@@ -2449,8 +2448,8 @@ exports.aceInitialized = (h, ctx) => {
|
|
|
2449
2448
|
// Only intercept insert types
|
|
2450
2449
|
if (!inputType || !inputType.startsWith('insert')) return;
|
|
2451
2450
|
|
|
2452
|
-
// Target only Android
|
|
2453
|
-
if (!
|
|
2451
|
+
// Target only Android browsers (exclude iOS)
|
|
2452
|
+
if (!isAndroidUA()) return;
|
|
2454
2453
|
|
|
2455
2454
|
// Get current selection and ensure we are inside a table line
|
|
2456
2455
|
const rep = ed.ace_getRep();
|
|
@@ -2615,7 +2614,7 @@ exports.aceInitialized = (h, ctx) => {
|
|
|
2615
2614
|
|
|
2616
2615
|
// Composition start marker (Android Chrome/table only)
|
|
2617
2616
|
$inner.on('compositionstart', (evt) => {
|
|
2618
|
-
if (!
|
|
2617
|
+
if (!isAndroidUA()) return;
|
|
2619
2618
|
const rep = ed.ace_getRep();
|
|
2620
2619
|
if (!rep || !rep.selStart) return;
|
|
2621
2620
|
const lineNum = rep.selStart[0];
|
|
@@ -2632,7 +2631,7 @@ exports.aceInitialized = (h, ctx) => {
|
|
|
2632
2631
|
$inner.on('compositionupdate', (evt) => {
|
|
2633
2632
|
const compLogPrefix = '[ep_data_tables:compositionHandler]';
|
|
2634
2633
|
|
|
2635
|
-
if (!
|
|
2634
|
+
if (!isAndroidUA()) return;
|
|
2636
2635
|
|
|
2637
2636
|
const rep = ed.ace_getRep();
|
|
2638
2637
|
if (!rep || !rep.selStart) return;
|