[0.21] [Android] Can't select text inside a TextView

I don’t know if it has anything to do with the caret-at-the-end-of-input bug fix, but as of 0.21 I can neither move the caret inside a TextView (usually achieved by holding your finger to the screen for a while then moving it) nor select a portion of text, to cut or copy it (although I suspect this is a result of the first issue).

Hi cyril,

Is this target specific or is it happening in preview and on device?

It was on Android Preview but the issue has gone away since then

Actually scratch that, I still have the bug. It’s just not happening on every TextView, just one specific one. It’s really hard to debug, but I finally found what was causing it. At the end of my .ux page, I have these lines:

    <Change PairMessagingPage.Visibility="Collapsed" Delay="0.2" />

If I delete the Change, the bug disappears. I need this node, as this is how I navigate between different pages. I don’t see any easy workaround, but maybe you get an idea of the root cause?

Full repro example (try selecting text in the TextView: no cursor):

    var Observable = require('FuseJS/Observable');
    var currentPage = Observable('First');

    module.exports = {
        currentPage: currentPage,
        navigate: function () {
            currentPage.value = 'Second';
<DirectNavigation ux:Name="NavMain" Active="{currentPage}" />
<Page ux:Name="First" Background="Red">
        <Callback Handler="{navigate}" />
        <Change First.Opacity="0" Duration="0.2" />
        <Change First.Visibility="Collapsed" Delay="0.2" />
</Page><Page ux:Name="Second" Background="White">
    <TextView ux:Name="GroupMessageInput" TextWrapping="Wrap" Padding="6,6,0,6" Value="Hi this is some kind of Lorem Ipsum that will get big enough so that it wraps around once or twice…" />
        <Change Second.Opacity="0" Duration="0.2" />
        <Change Second.Visibility="Collapsed" Delay="0.2" />

I’ve bumped this internally as I’m seeing a similar issue on the latest version. For me I can select but only after the device has rotated once. Sounds nasty.

Were on it though

What device is this failing on? I can select text without problems at first try and also after reloads.

Nexus 5. Same behavior as Chris though: if I rotate the device, it works (and if I rotate it back to initial position, it’s fixed).

Hmm, this is very strange. My first test was on my Nexus 5, and there it works. I just tested on a Nexus 9 tablet, and there the bug does trigger as described. Kinda feels like something weird is going on in Android. Changing Second.Visibility="Collapsed" to Second.Visibility="Hidden" makes it work. You can use that as a fix in the meantime, it might take some time to track down the bug here.