@@ -23,9 +23,24 @@ import { Inlay } from '../'
2323 * SPACE PRESERVATION: When swipe-typing after existing text, iOS inserts
2424 * " word" (with leading space). On backspace, only "word" should be deleted,
2525 * preserving the auto-inserted space.
26+ *
27+ * NOTE: These tests use synthetic events to simulate iOS/Android native IME behavior.
28+ * They pass on desktop browsers but fail on Playwright's mobile-safari emulation
29+ * because WebKit in mobile touch mode has different event handling. The mobile-safari
30+ * project is NOT real iOS Safari - it's desktop WebKit with iPhone viewport/user-agent.
31+ * Real iOS testing requires actual devices or cloud device farms.
2632 */
2733
2834test . describe ( 'iOS swipe-text bug' , ( ) => {
35+ // Skip on mobile-safari: Playwright's mobile-safari is desktop WebKit with mobile viewport,
36+ // not real iOS Safari. It has bugs with keyboard input (text reversal) and synthetic events.
37+ test . beforeEach ( async ( { } , testInfo ) => {
38+ test . skip (
39+ testInfo . project . name === 'mobile-safari' ,
40+ 'Skipped on mobile-safari: cannot emulate iOS native IME behavior'
41+ )
42+ } )
43+
2944 /**
3045 * Test that input works after deleting content.
3146 * Verifies no crash when typing after deletion.
@@ -561,6 +576,14 @@ test.describe('iOS swipe-text bug', () => {
561576 * THE FIX: Check event.dataTransfer.getData('text/plain') as fallback when data is null
562577 */
563578test . describe ( 'iOS Safari text suggestion' , ( ) => {
579+ // Skip on mobile-safari: cannot emulate iOS native IME behavior
580+ test . beforeEach ( async ( { } , testInfo ) => {
581+ test . skip (
582+ testInfo . project . name === 'mobile-safari' ,
583+ 'Skipped on mobile-safari: cannot emulate iOS native IME behavior'
584+ )
585+ } )
586+
564587 /**
565588 * iOS Safari sends insertReplacementText with the replacement text in
566589 * dataTransfer instead of data (unlike Android GBoard which uses data).
@@ -752,6 +775,14 @@ test.describe('iOS Safari text suggestion', () => {
752775 * time window, extend the tracking to include the space instead of clearing it.
753776 */
754777test . describe ( 'iOS swipe-text trailing space' , ( ) => {
778+ // Skip on mobile-safari: cannot emulate iOS native IME behavior
779+ test . beforeEach ( async ( { } , testInfo ) => {
780+ test . skip (
781+ testInfo . project . name === 'mobile-safari' ,
782+ 'Skipped on mobile-safari: cannot emulate iOS native IME behavior'
783+ )
784+ } )
785+
755786 /**
756787 * iOS sends a trailing space after swipe-typing, which clears our tracking.
757788 * Backspace should still delete the whole swiped word.
@@ -1054,6 +1085,14 @@ test.describe('iOS swipe-text trailing space', () => {
10541085 * leading space from the insert to avoid double-spacing.
10551086 */
10561087test . describe ( 'iOS swipe-text double space prevention' , ( ) => {
1088+ // Skip on mobile-safari: cannot emulate iOS native IME behavior
1089+ test . beforeEach ( async ( { } , testInfo ) => {
1090+ test . skip (
1091+ testInfo . project . name === 'mobile-safari' ,
1092+ 'Skipped on mobile-safari: cannot emulate iOS native IME behavior'
1093+ )
1094+ } )
1095+
10571096 /**
10581097 * When swiping " world" after "hello " (which already has trailing space),
10591098 * the leading space should be stripped to avoid double-spacing.
@@ -1170,6 +1209,14 @@ test.describe('iOS swipe-text double space prevention', () => {
11701209 * This space should be stripped since it's at the start of a line.
11711210 */
11721211test . describe ( 'iOS swipe-text after newline' , ( ) => {
1212+ // Skip on mobile-safari: cannot emulate iOS native IME behavior
1213+ test . beforeEach ( async ( { } , testInfo ) => {
1214+ test . skip (
1215+ testInfo . project . name === 'mobile-safari' ,
1216+ 'Skipped on mobile-safari: cannot emulate iOS native IME behavior'
1217+ )
1218+ } )
1219+
11731220 /**
11741221 * When swiping "world" after "hello\n", the leading space should be stripped.
11751222 * iOS sends swipe data with leading space even at start of line.
0 commit comments