I am trying to select the text of my input field in unity, when clicking on it. It works in the editor, but none of selecting methods work on android devices.
The keyboard on android will only open itself by default on the following GUI elements: GUI.TextField GUI.TextArea and GUI.PasswordField. Make sure you are using one of these types for your inputfield. Also make sure "hide mobile input" is unchecked.
Alternatively you can make a call to open the onscreen keyboard yourself using TouchScreenKeyboard.Open(). Mind that if you open the touchscreen keyboard yourself it will not automatically populate the field field and you'll have to call to TouchScreenKeyboard.text to acces what the user is typing. Eg. myInputfield.text = myTouchScreenKeyboard.text to the set the text in myInputField
for all touchscreenkeyboard functionality see the docs here and here
Related
I'm trying to open up the oculus keyboard when the user presses into the input field. I tried using TouchScreenKeyboard.Open() but sadly it didn't work. The Oculus integration OVRCameraRig "Requires System Keyboard" solution doesn't work either since the platform is WebGL and not Android.
The input field interaction does work since I'm getting the blinking line when clicking the input field, there's just no keyboard showing.
Last resort would be to make an actual keyboard that would pop up on the canvas after the user presses the input but that would require reworking of the UI and having the system keyboard pop up simply sounds like a better and cleaner solution.
On Change the Select is not triggering the click event of Input type file in Safari, but it works good in Chrome and Firefox.
Though the input type file is not hidden or visibility none.
My Fiddle :
`https://jsfiddle.net/vinoth06/yLshkbwp/8/`
Yes this seems to be the behavior in iOS and Safari.
The change event does get triggered in Safari as well.
However the file input click action alone doesn't get fired.
Suggestion:
If its fine to use a button instead of select, here's a fiddle extended from yours. https://jsfiddle.net/Le7dcz0b/
A button click event works! It's able to open your File upload dialog in Safari/Chrome.
I want to make a tinymce box disabled which I sort of manage but in chrome the content still is editable to a limited extent. I will explain below:
I first initialize the editor, then I disabled the editor if another parameter is true. I disable the editor with this command:
tinyMCE.get('taClientInformationNotebook').getBody().setAttribute('contenteditable', false);
This disabled the editor however in chrome, if I mark some text in the editor, and press any key on the keyboard the text gets replaced with the pressed character. However it is only possible to press a key once, any further input will be ignored.
So you could say that in chrome the tinymce box is disabled fully but allows for one character to be input. Very strange..
No problems in IE.
How to disable fully in chrome? I've also tried disabling the editor with other commands like "myeditor.setMode('readonly')" and "editor.settings.readOnly=true" but with the same results.
My GEF editor (extending GraphicalEditorWithFlyoutPalette) always opens the editor with the palette hidden on first start of the application / first opening of the editor (after a build for example).
As this will potentially bewilder users who'll need to go in search of the flyout icon first, I'd like to have the palette view shown whenever the editor is opened. The user can then choose to close it on his/her preferences.
How can I achieve this? The API doesn't seem to give any clues, or I'm unable to find them...
The state of the palette defines if it is open or closed. This state is accessible using the getPalettePreferences().setPaletteState() method that is accessible in the GraphicalEditorWithFlyoutPalette. To open the palette, you must set it to the FlyoutPaletteComposite.STATE_PINNED_OPEN, like this:
getPalettePreferences().setPaletteState(FlyoutPaletteComposite.STATE_PINNED_OPEN);
If you want to ALWAYS override the state so that the palette is always opened with the editor, you have to add the line to the constructor of your editor. If you only want to do this once, and then leave the state as it was last selected by the user... No idea how to do this :-(
How can I know when an icon is clicked using tinymce editor? Actually I am trying to solve the issue of multiple windows opening when we click multiple times to the jbimage plugin icon.
I want to make sure that when there is already an uploaded image window then the second popup should not appear.
Looks like you will have to adjust the plugin code and decide this case using a variable you set to true when the popup opens and reset it when the popup is being closed.