I have issue when using react-bootstrap-typeahead on mobile. I want to turn off autocorrect of input but i don't know how to do it.
please help me.
thank all so much.
In general, you can use the spellcheck attribute (as well as autocorrect in Safari) on inputs to disable these features. In react-bootstrap-typeahead, you can set these values using the inputProps prop:
<Typeahead
inputProps={{
autoCorrect: 'off', // Safari-only
spellCheck: false,
}}
/>
However, note that according to caniuse:
The partial support in mobile browsers results from their OS generally having built-in spell checking instead of using the wavy underline to indicate misspelled words. spellcheck="false" does not seem to have any effect in these browsers.
So, it may not be possible to fully disable autocorrect in mobile browsers since that can be up to the individual's OS-level settings.
Related
and thank you in advance. I am experiencing an issue with Google Chrome today. I have made the decision to implement a JS plugin called awesomplete, it is a autocomplete plugin. The plugin works wonderful in every browser except for Google Chrome. The plugin works, except Google Chrome is ignoring my autocomplete="off" pleas and throwing in its own suggestions which, of course, appear OVER the awesomplete's generated content.
Whenever I type into my input, Google Chrome automatically creates a menu below the input, exactly as if there was a datalist attached to the input (which there isn't). This false "datalist" appears over the awesomplete suggestions making the plugin useless. I have searched and searched without success. I have tried both autocomplete="false" and autocomplete="off" on the form, and on the input. I also have aria-autocomplete="off" on there even though I'm not sure what that does. I have even tried a suggestion from others to put to "fake" inputs at the beginning of the field, so that Google Chrome's autocomplete feature will attack them instead of the real input. Yeah, no go.
Most of my users are using Google Chrome, so this is a problem for me. Is there anything I can do? Or I'm I left helplessly powerless to the browser, who for some reason the devs decided to take form matters into their own hands.
<input required type="search" data-list="<?php echo $list; ?>" class="awesomplete" name="gameSearch" size="50" placeholder="Search for game titles here!" autocomplete="off" aria-autocomplete="list">
$list is a generated list of game titles courtesy of some php before the input.
Any advice or help is greatly appreciated...
I am pretty much sure chrome does it by matching the 'id'/'name'. At this point of time, I guess there is no solution other than removing them off your datalist.
I have a question before downloading tinymce.
Does anyone know if its possible to disable features for the users? (Example, make it so the user can only input text, not pictures)
And also, is it possible to change the style/css of the buttons and toolbar so they fit with your site?
You should manipulate tinymce.init() by adding or removing the unwanted plugins.
There are tons of options, so do some experimenting.
However, you should really begin with reading the documentation.
Visual editors such as kupu and tinymce don't allow you to type when used on an iphone. In Plone HTML view still works but the user will have to know html syntax. Is there any better work around?
Problem here is that most modern mobile phones (with a few exceptions) do support web browsing with a limited functionality only. Functionality that is necessary in order to use kupu and tinymce. Plone HTML is a good approach. You might have a very simplified html element description on that page or linked with the very few elements a user needs.
Plone supports plain text and restructured text (same as Sphinx docs) in rich text input also.
This is enabled for the default Page content type, though the option has been hidden in the latest Plone versions I think.
What you would need to do is to write a plug-in which monkey-patches rich text field to force the input to to be plain text/restructured text on mobile browsers.
Web and Mobile provides some facilities for this, to see whether a HTTP request is from a mobile user agent (mobile.sniffer package)
http://webandmobile.mfabrik.com/
I'm attempting to do the same thing on my DroidX with Plone 4.0.5. I've tried the default Browser, Dolphin, Opera Mini, Opera Mobile, Firefox 4, and Firefox 5. So far Rich Text fields do not work in the default Browser, Dolphin, Opera Mini, Opera Mobile. I got close in Firefox 4 and 5 as I could enter text but just not "see" it properly. However, Firefox 4 and 5 are buggy and locked up when I attempted to use them.
The way I got around this problem was to turn off javascript in your mobile browser and then when you edit your content use either Plain Text, Markdown, or type in the raw HTML into the place where the Rich Text field is supposed to be. I could successfully enter text this way in the default Android Browser and Dolphin.
How do you put the Amazon Kindle web browser into Article Mode via HTML or Javascript?
Editor's note: Some pages are not automatically detected as "articles" by the Kindle 3 browser, and give an error message when trying to go into Article mode. What does the Article mode use to determine what portion of the page to display?
Is this related at all to Readability?
http://lifehacker.com/5163401/readability-bookmarklet-quick+formats-pages-for-smoother-text
Actual JavaScript code for Readability, which is heuristic based:
// Study all the paragraphs and find the chunk that has the most <p>'s and keep it:
This also appears to be related to Safari 5's Reader mode. Here is what is required for Safari Reader:
This definitely needs more investigating, but so far, these appear to be the most important factors for Safari’s Reader functionality to kick in:
Use the right markup, i.e. make sure the most important content is wrapped inside a container element. Whether you use <article>, <div> or even <span> doesn’t seem to matter — as long as it’s not <p>.
The content needs to be long enough. Use enough words, use enough paragraphs, use enough punctuation. Every paragraph should have at least 100 characters.
Reader doesn’t work for local documents.
http://www.wired.com/gadgetlab/2010/09/simple-tip-turns-kindle-into-ultimate-news-reader/ - The "f" key feature outlined above or some other feature? Not quite sure what article mode means.
It means that the browser will try to identify if the page you are looking at has a main body of text (is an article), parse it out and then display only that text without clutter and for easy scrolling.
I don't think you can force it via the web page's code
As far as I know, once the website has loaded (and if you are on an specific topic) you can turn on the "Article Mode" from the menu.
I've seen similar JS tools for Chrome too, so I assume it's part of webkit.
I know that at the time of this writing only Opera supports a browser UI for
<input type="date" name="mydate">
and maybe my attempts to localize this field have been met with frustration because niceties like localization have not yet been included in their implementation, but I don't even see mention of it in the HTML5 spec. Is there a way that localization should be specified? Should I do lang="fr" on a parent element?
Some notes on the implementation of the site in question:
Localization (language) is explicitly picked by the user because they are managing data in multiple languages and it is not reasonable to expect that the user's browser chrome is in the language being viewed or that the browser is providing desired language request headers.
I want to be sure that if the page is rendered in French that the date picker provided by browser chrome shows options that make sense for French language.
The plan is to fall back to jQueryUI for browsers that do not support type="date", I will use the detection mechanism provided in Dive into HTML 5
From what i know, the thinking behind what we do in Opera (full disclosure: I work for them) is that the date picker is almost an extension of the chrome, a browser-native control. As such, it will be localised according to the language of the browser, rather than the language of the page being viewed.
I agree with lambacck. Currently I am writing Javascript code to make the new form features available cross browser, using jQuery UI for this.
I work in Luxemburg which is a good place to illustrate the localization problem in more detail.
Most websites we write are multilingual de|fr|en. From our stats we can tell, that people use the language switch on the site to display their preferred language, but this choice rarely matches the preferred browser locale.
If the locale of the calendar etc. field is done by the OS, this brings us back to the unfortunate <input type=file> situation where the label reads Upload a file and the button says Parcourir. You can do nothing about this language mix and I always found this to be a major annoyance.
Conclusion, I have to overwrite the default calendar with the jQuery one to be sure it does what I want.
In my opinion a configurable API or at least a way to manipulate the locale on a HTML level would be great. Since the new field types are not widely adopted yet by the other browser manufacturers, I imagine this issue could still be taken in account.
Thanks for reading this.
For mobile the best solution we have found is to use a text input for date entry, with a calendar icon next to it that has an invisible date input over the icon.
Advantages:
works on all browsers and devices
can use next button into date on iOS (if multiple fields)
user can type in date (very useful)
avoids iOS UI bugs (1. editing existing data with blank date, next into date, date value is set to today - arrrgh, 2. keyboard showing, next into date, popup shows and keyboard disappears - ouch)
use a date library to show date in input as localisation set for your user's account (not browser), and can use a smart date library (type in "tomorrow" etc).
click calendar icon to see date as browser localisation
graceful fallback even if input type=date not supported by device/browser (e.g. some Android devices don't support date or have serious bugs).
for desktop (detected by no touch support) we show our own custom date dropdown.
HTML is a something like:
<input type=text>
<span style=position:relative>
<input type=date class=date-input tabIndex=-1>
<div class=date-input-icon>▼</div>
</span>
CSS:
.date-input {
position: relative;
z-index: 1;
webkit-appearance: none;
display: inline-block;
opacity: 0;
width: 1em;
}
.date-input-icon {
position: absolute;
right: 0;
width: 1em;
}