I'm guessing there's an exception in the JavaScript side. Ideally you would 
connect to the iOS webkit debugger on the device to see that. Haven't tried 
this: 
https://stackoverflow.com/questions/25871586/how-to-debug-javascript-code-inside-a-wkwebview

On Thursday, July 8, 2021 at 1:21:47 PM UTC+3 P5music wrote:

> My app features a BrowserComponent where text is edited and it is also 
> possible that material icons are displayed as images inside the BC.
>
> The images are created as base64 data and injected as IMG tags.
> It works, but there is something very strange happening.
>
> The user experience is the following (iOS simulator, iOS 14, iOS 12):
>
> -entering the editable area inside the BC
> -clicking one button outside the BC to inject the image at the caret 
> position
> -the button has a listener, and when the method is executed the some 
> javascript is executed
> -the javascript detects the caret position and calls a callback.success 
> method that opens a dialog (it's a special class CommandDialog) with 
> confirmation buttons and a TextField.
>
> now
> two possible scenarios are experienced:
> 1-the user hits the OK button and the image is correctly injected with 
> another javascript command
>
> 2-the user edits the TextField or just enters it (click inside) and the 
> image is not injected, so I think the javascript command is uneffective, or 
> the selection range is lost (the care position is in that range javascript 
> object)
>
> When entering the textfield I see that something happens in the layout, 
> maybe it is recalculated, I notice slight movement of some buttons.
>
> Are you aware or guessing of some problems that the TextField can cause to 
> the described workflow? What disturbance is made to the BC, just when the 
> TextField is entered?
>
> This issue is not present when testing on the CN1 simulator. Images are 
> always correctly injected despite even editing the TextField.
>
> Thanks in advance
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/edec807f-6d2b-4156-9d68-b7c48d2aa1b7n%40googlegroups.com.

Reply via email to