On mobile browsers, Is there a way to prevent the default keyboard (like when using the readonly=true property on the textarea) while keeping the caret or text insertion cursor functioning?
To enable the user to choose a location inside the textarea, while not poping-out the keyboad?
I'm not entirely sure that this would stop the keyboard from appearing, but this would keep the user from typing in the textarea:
<textarea maxlength="0">Put your text here</textarea>
Keep in mind that this isn't supported in Internet Explorer below 9, and it is not supported in Opera. Seeing that you are aiming for mobile devices, this shouldn't really be a problem.
Related
Suppose I have a high textarea, like this:
<textarea cols="40" rows="200"></textarea>
such as the one in https://jsbin.com/jevipuz.
When I open this site in mobile Safari or Chrome on iOS and I start typing in the textarea, the text disappears behind the soft keyboard after a while, because the body doesn't scroll to keep the cursor in view. It works correctly on Android mobile browsers (and desktop browsers).
Is there a way to make this work on iOS as well, using HTML, CSS and/or JS?
I have a page with a form that built with react and on the inputs, while the user start to write something, the autocomplete open but if the user scrolling up/down the autocomplete stay at the position that it open (Like a fixed position).
**
I can't inspect this of course...
This happens on all browsers (CH, FF, IE)
Any idea...?
All these auto complete are browser specific. It depends on browsers how they have styled and positioned their autocomplete. For some browser it is also possible to not have auto-complete feature. You can not changed it from your project you can disable them from your browsers if you want.
So I'm trying to auto select all the text within a textarea on click. Here's my code:
<textarea class="donger" onclick="this.setSelectionRange(0, 9999);" readonly="readonly">Testing</textarea>
http://jsfiddle.net/fvy37tyc/
This works fine in iOS Safari, however it doesn't work in iOS Chrome. If I remove the readonly it works in both browsers but unfortunately then it brings up the keyboard which covers half the screen.
I tried this to remove the keyboard, but unfortunately it disables the auto select:
$('.donger').blur();
Question
So does anybody have any ideas that I could select the text on click on mobile without having the keyboard come up?
I have an HTML page which has an input field with type="text", autocomplete="off" and autocorrect="off"
Although this turns off the drop down that appears below the input field with previously entered values, I still get these values in the suggestions that appear above my soft keyboard in Samsung Galaxy Tab S tablet. Please see the image below.
Setting autocomplete="off" and autocorrect="off" works fine for Sony Xperia Z tablet. But Samsung Galaxy Tab S is giving issue, which has android 4.4.2 and chrome browser version 38.0.2125.102.
Anyone knows why?
Note: I know i can turn off suggestions from keyboard settings or change the keyboard itself, but i want it to work without the user having to do that. For example sony xperia z tablet have suggestions turned on but it never shows suggestions for input fields that have autocomplete=off, and shows suggestions otherwise.
I could be way off base here, but my thought is that its the keyboard you are running. Samsung's default keyboard on the Tab might have autocomplete/autocorrect by default. There should be another keyboard you can switch to (whether it be android's default or something else). Switching might get you the result you are looking for.
Quote yanchenko from https://stackoverflow.com/a/4488987/2026478
When developing for 2.0+, the supposed way is setting android:inputType="textNoSuggestions" (ref). Unfortunately, suggestions are still shown on HTC Desire 2.2 (and probably other HTC Sense devices as well).
With "android:inputType="textVisiblePassword" the sotware keyboard by HTC won't allow you to switch language.
So I stick to "android:inputType="textFilter" to disable suggestions.
Or programmatically
Quote 1ka from https://stackoverflow.com/a/5039551/2026478
final EditText et = (EditText) findViewById(R.id.SearchText);
et.setInputType(et.getInputType()
| EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS
| EditorInfo.TYPE_TEXT_VARIATION_FILTER);
Source: How to disable displaying "suggestions" on the Soft Keyboard
I have a simple web form which is having four input text fields.
Assume I have currently focused on 2nd text field and now I'm moving out from it and clicking on an empty area of the window (so now the focus will not be there).
If I press the tab key now, then apparently it should move to the 3rd text field. This happens in firefox, IE and even in Chrome 27 when I checked. But in Chrome 33 and latest Chrome versions focus goes to 1st text field**.
Is this the default behavior of Chrome latest versions? Are there any possibilities to avoid this and get the same behavior of IE and firefox for tabbing feature?
Note: You can test this scenario using gmail's login page form.