0 Replies
      Latest reply on Nov 3, 2019 11:30 PM by KiwiDev
      KiwiDev Level 1 Level 1 (0 points)

        We have been trying to port our iPad app to Mac Catalyst but have struck a deal breaker.

        A major part of the app allows users to edit formtted messages using WKWebView with a <div contenteditable="true"> container.



        WKWebView *web = [[WKWebView alloc] initWithFrame:CGRectMake( 10,10, 300, 200)];

        [self.view addSubview:web];


        NSString *html = @"<html><body><p>MESSAGE<div contenteditable=\"true\">some text to edit</div></body></html>";


        [web loadHTMLString:html baseURL:nil];


        Using Catalina v10.15.1 and XCode v11.2


        Everything works fine in the iPad OS but on Mac Catalyst the edited text can't be selected for formatting or even just copying/editing. Clicking and dragging the mouse just moves the cursor without selecting anything. Doing frantic multiple clicks seems to select some text but it can't be presented to users in this state.


        Doing a shift + arrow key to select a text range will throw this exception:

        -[UIKeyboardImpl _handleWebKeyEvent:withIndex:inInputString:executionContext:]: unrecognized selector sent to instance.


        We have filed bugs related to these but I am wondering if there some tweak to allow formatted text edit selection or do we just need to wait until this is resolved in an update ?