I have an app with multiple WebViews. Beginning with Android WebView 90.0.4430.66, some of the WebViews no longer display ActionModes (cut, copy, paste menus) when text is selected. The text selection works fine with handles appearing and behaving as expected. But no ActionMode menu appears.
The layout of the app is quite complex. For example, all the WebViews are laid out inside of ViewPagers. And there are some differences between the WebViews where the ActionModes work and those where they don't. For example, the working WebViews are inside of a dynamic ViewPager that can add and remove pages, while the ones that don't are inside of static ViewPagers with an unchanging number of pages.
I have spent some time poking around at settings that I would think might be causing the problem (checking to make sure the same style is applied to all the activities, tweaking the code on the non-working WebViews to make them more similar to the ones that are working, etc.) but I haven't been able to find what is causing the issue. I am not overriding onActionModeStarted()
or in other ways attempting to modify the default WebView ActionMode.
The ActionModes work correctly if I downgrade WebView to be < 90.0.4430.66. That seems to indicate that something changed in that version of WebView which interprets some aspect of my code to be an instruction to disable the ActionMode (or, at least, not to populate it with any items). My question is, does anyone know what things can unintentionally cause WebView to decide to disable the ActionMode menu?
This ended up being a bug in Android's WebView, and was kindly fixed by Google in 105.0.5195.35.
https://bugs.chromium.org/p/chromium/issues/detail?id=1330679