Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40534

Placeholder text in TextField disappears on TextField tap

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0 RC
    • 5.3.0
    • Quick: Controls 1
    • None
    • iOS7 emulator, iPhone, Nexus 5
    • iOS/tvOS/watchOS
    • I0de2cb65c7c59d54365172b9233a5aba0f067ff5

    Description

      1. Tap into text with placeholder

      Expected
      2. Cursor and keyboard appear, placeholder is shown

      Actual
      2. Cursor and keyboard appear, placeholder disappears
      3. Interestingly if you click more, sometimes, but not always it appears again

      Looking at TextField code, it seems to be wrong calculation of opacity in its placeholderTextComponent - possibly wrong detection of textInput.inputMethodComposing

      On desktop same things work fine, it's iOS-specific issue

      Steps for Android
      1. Run placeholder.qml
      2. Tap TextField
      3. Type Q
      4. Press backspace

      Expected:
      Placeholder text to appear

      Actual:
      No placeholder until input method is reset (by pressing input again etc)

      Cause is probably same as on iOS see TextField.

      When inputMethodComposing textInput.text.length does not change until inputMethod.commit()/reset(), maybe textInput.displayText.length would work better.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            samuelnevala Samuel Nevala
            artem.marchenko Artem Marchenko
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes