material-components / material-components/material-components-android

[TextInputEditText] Setting textIsSelectable=true disables soft keyboard on Samsung Devices

Open
#2,262 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Widget: TextField
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:**
When applying a style to a TextInputEditText, if the property `textIsSelectable` is set to true, the soft keyboard does not appear, specifically on Samsung devices, when the component is tapped on / focused. When this attribute is removed from its style, the soft keyboard appears to work just fine as expected.

**Expected behavior:**
When the TextInputEditText is tapped on / focused, the soft keyboard should appear.

**Source code:**
styles.xml where the component style is declared:
```

<item name="android:textIsSelectable">true</item>

```
theme.xml where the style is applied:
```

<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryVariant">@color/color_primary_variant</item>
<item name="colorSecondary">@color/color_secondary</item>
<item name="colorSecondaryVariant">@color/color_secondary_variant</item>

<item name="android:colorBackground">@color/color_background</item>
<item name="colorSurface">@color/color_surface</item>
<item name="colorError">@color/color_error</item>

<item name="colorOnPrimary">@color/color_on_primary</item>
<item name="colorOnSecondary">@color/color_on_secondary</item>
<item name="colorOnBackground">@color/color_on_background</item>
<item name="colorOnSurface">@color/color_on_surface</item>
<item name="colorOnError">@color/color_on_error</item>
<item name="colorBackgroundFloating">@color/color_background</item>

<item name="textInputStyle">@style/TextInputStyle</item>

```

**Android API version:**
7.0 (API 24)

**Material Library version:**
1.4.0-rc01

**Device:**
Samsung s6, Samsung Galaxy S6 edge+

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the styles.xml TextInputStyle and theme.xml Base.AppTheme examples, using TextInputEditText with android:textIsSelectable enabled on Android API 24 Samsung devices. Inspect the TextInputEditText behavior around focus and keyboard display; done means tapping or focusing the component reliably opens the soft keyboard without removing text selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.