简体   繁体   中英

Input Text fields don't move cursor on mouse click?

I have an issue with all of my Input Text fields, maybe someone has an idea:

I'm using GWT , and just discovered that the text in of my Input Fields cannot be selected using Mouse. Also clicking inside the text does not move the cursor.

But giving them Focus using the cursor works. Selecting all with CTRL+A as well as moving the cursor with Arrow Keys works as expected.

I inspected the TextBox specific onBrowserEvents() method and can see, that click events are received well. Just somehow they don't modify the text input control in the browser.

I tested different machines and different browsers, which all behave the same. So it must be something in my Application.

Maybe somebody has an idea what I could have done wrong? I can't even imagine anything that could produce this behaviour on all of my input fields.

It just turned out to be a CSS issue:

I had -moz-user-select: -moz-none; to prevent doubleclick issues for some of my components. I now excluded the input element from it and everything works fine again.

I use this to solve the problem with selecting text and moving the cursor on the text in the inputs:

*, ::before, ::after
    -webkit-user-select: text

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM