wordpress-mobile / AztecEditor-Android

A reusable native Android rich text editor component.
Mozilla Public License 2.0
673 stars 114 forks source link

Fixed autosuggestion issues (non Samsung) #1049

Closed khaykov closed 10 months ago

khaykov commented 10 months ago

We got a report that autosuggestion is acting weird on non-Samsung devices. This is pretty weird, so investigated and found that the issue was introduced with #1033.

Luckily, the fix is pretty simple - we want to use existing InputConnectionWrapper, as a base class for DeleteOverrideInputConnection and not our own implementation.

There are two things we need to test. First is the Autocorrect - you want to use non-Samsung Android 13 with Gboard (emulator works as well).

Next, we need to make sure the changes in #1033 are working as expected. This only applies to soft keyboard. You will also need to modify a bit of Main Activity to do this:

 val  placeholderManager = PlaceholderManager(
                visualEditor,
                findViewById(R.id.container_frame_layout),
                htmlTag = "placeholder"
        )

        val imageWithCaptionAdapter = ImageWithCaptionAdapter()

        placeholderManager.registerAdapter(imageWithCaptionAdapter)