I am looking for answer hours already and couldn't find any good solution: I am using react js and redux and trying to solve this issue mostly for Chrome.
Component which is observing one of redux state, contains Input field and whenever I set in redux focusInput: true I am calling function with following code:
inputRef.current.focus()
It works on Android phone. Input field gets focused and keyboard pops up, but couldn't make it work for IPhone.
Found many articles around this topic but all seems like ugly workaround... one of example is on this article .
Is there any good api for Mobile virtual keyboard or solution?
Related
I'm following a guide for a hangman game built using react...
I have a useEffect function which contains event listeners for keypresses.
However when viewing the page on mobile devices, there is no way to bring up the keyboard to actually press the keys.
this is a tricky question
Try using the .prompt() method
see this tutorial
https://www.w3schools.com/jsref/met_win_prompt.asp
This is something that is bugging me a lot. I see a lot of hybrid apps made in HTML5/JS that present this problem. To date, I havent found a reliable solution.
The problem is that, in mobile, with the regular and more used angular event: (click), as so:
<button (click)="dosomething()"></button>
There are 2 major problems:
When you press on it, and you do a long press, it will never, ever call the click action. If you havent defined or coded a long press, this a very very very very very bad UI behaviour. The "tap" is, therefore, badly implemented. If you go to your android calculator, you'll see that when you press a number, and wait 5 seconds, when you release, it will trigger. Which is how it should work.
If you press it and move slightly, the action will not trigger. This is also something that is quite bad for UX purposes.
Does anyone know a solution to this or an alternative?
We have a phonegap/ionic application targeting iOS. We have been testing with the ipad air simulator (xcode) and ipad air (10.3.3), ipad Pro (11.0.3).
The app is an ionic (v1) app that downloads and loads stand alone html files (the files contain css, html, js in one doc). The documents are typically long forms. In all test environments we are getting odd behavior with selects/drop downs.
When you click/tap on a select the options will appear correctly.
Then when you click/tap somewhere else, blank space or another input field you will usually get the select options bubble again but it will be empty.
In the above image I made my selection from the options and then clicked into the next field.
This was intermittent at first and now it seems to happen all the time. It seems like it has something to do with losing focus but I am unable to see why this is popping back up. I haven't found anything very useful from searching online in regards to this problem.
UPDATE 11/7/17
After more thorough searching this seems to be due to building the app with xcode 9 and/or the use of UIWebView vs WKWebview. I also looked through the code more to see we were already using WKWebView not UIWebView and the problem is still present. As someone mentioned in this thread.
Good thing is Cordova has support for WKWebView too. You have to install the plugin: cordova-plugin-wkwebview-engine
I've seen multiple questions regarding how to check the presence of a back button in Android, but they all seem to be geared towards apps in Android, which I don't believe would help here.
I want to determine the need to show a back button in a webapp that will be run across multiple OS's, and I know with javascript you can check what OS the device is, which answers the need to show or not show a back button for iOS, or Windows Phone, but with Android, since there's many different button set ups, I would like to be able to check the presence of either a software back button (like an LG, OnePlus One or something) or a hardware back button you would see on most other devices with hardware buttons. I can't seem to find an answer in my searches, and if it's not possible, that's fine, I just want to ask and be sure. Again, any answers need to be relevant to javascript solutions. If there are any useful libraries or tools I can integrate in with the javascript, (i.e. something in angular, jquery, etc. then I'm happy to entertain those solutions as well).
I need to disable fullscreen message ("you've gone fullscreen") coming on the top when chrome fullscreen mode is activated .
i need to do it through javascript . but it's one of the default functionality of chrome.
can any one help me out ?
It's not possible. As you pointed you it's one of the default functionality of chrome.
and I agree with the comment by mic You can't it's there for security
That message is, if you it can be disabled at all, likely a user preference. I have had my fair share of changing that kind of things for a custom "layer" over windows with an integrated browser and I can tell you it's impossible with javascript without some listener app. We created a C# listener app for that kind of thing that keeps checking a certain text file. We made javascript edit the text file and then let C# work it's hacking magic in some of the user's settings.
You could take a look at Chromium, the stripped down version of Chrome, if that would be of any help ;)
ps: To all the people going mental over changing user settings like that, our customers were old people that were unable to use a computer, and our application's purpose was to do as much as possible for them.
You cannot possibly do that as suggested by these links.
https://superuser.com/questions/398945/disable-the-youve-gone-full-screen-notification-in-chrome
https://groups.google.com/forum/#!topic/chromebook-central/h1crbhOy-7U
On the other note, why exactly would you want to do that?