How to hide Virtual Keyboard with React JS - css

I've a input element of chakra-ui and i need to prevent that the virtual keyboard show when i click on the input.
I didn't find anything about it, only for react native

Related

React + Material-UI 4: When same-domain iFrame has focus, <Button> onClick doesn't get fired in Appbar

I have a React application that utilizes material-ui (v4). The specific component combination includes MUI's Appbar as a sticky header (position: sticky), which contains 2 Button components. The body of the component includes numerous tabs, some grids, etc..., and a same-domain iFrame.
Everything works fine, with one exception. When the iFrame has focus (a field or tab or whatever within the iFrame has been clicked), clicking directly on the Button components in the Appbar do not trigger the onClick callback. I temporarily converted the Button components into Link components, and attached an onClick event to those, and that works fine. A second click on the Button components does trigger the onClick callback.
I'm thinking that the Appbar is the issue, since I can place the Button components into the body (removing them from the Appbar), and their onClick callback is called.
So my question is - does anyone know if the Appbar MUI component specifically, in combination with a Button component, has some sort of limitation on event propagation? If so, is there a workaround other than converting the Button into a Link? Also, why does the Link work where the Button does not? And why does the button work in the body, but not in the Appbar?

Enable blinking cursor in QML TextInput object

I have to work with a code with custom touch numpad/keyboard implementation. The input field is based on TextInput object and I can achieve the 'static' cursor by modifying its direct members
textInput.cursorVisiblity=true
textInput.cursorPosition=val
It works fine, but the cursor is not blinking.
After some research I find out the solution by calling the method:
inputVal.forceActiveFocus()
It gives me proper blinking cursor, but also provides default keyboard panel which overrides the custom one.
I'd like to somehow turn on only this blinking cursor or at least somehow block the additional keyboard panel
It turned out that there were defined some global virtual keyboard that I had to disable

QML Virtual keyboard Hide button not working. Again

There's a similar question here but it seems rather out-dated since I use Qt 5.14. I have a similar problem.
I set the visible property of my InputPanel to active and tried putting the TextField into a TextInput but still I cannot hide the keyboard via the close button available in the bottom right corner .
Currently there are two workarounds for me :
1 ) Adding the onAccepted signal for any TextField or TextInput to hide the Virtual keyboard after hitting Enter (on Real or virtual keyboard , both works)
2 ) Adding a redundant Button to just hide the keyboard
But the clean method for closing it is what a typical user would expect : The specified button in the keyboard
Any help would be appreciated.

Xamarin Forms - Prevent webview from loosing focus on iOS

I'm trying to create an editor using Xamarin Forms.
The editor is a webview with content editable and a toolbar below.
You can check my current implementation here.
It works well on Android, when i tap on the button, it executes the javascript on the webview,the keyboard remains open and the webview doesn't loose focus.
On iOS the webview looses focus and the keyboard closes.
Like this:
Any idea on how can i solve this ?
What i tried so far:
Attach to the buttons an effect that calls ResignFirstResponder.
On the content editable, call focus when bluring.

Is there a way to show tooltip on disabled QWidget

I have a Qt form, where I have a button and menu. For various reasons I can disable certain elements, e.g button or some actions in the menu.
Is there a way I could show a tooltip or when the mouse is hovered over the disabled button or menu item with an explanation as to why it is disabled?
I am using Qt 4.8.
Thanks!
You can set the tooltip dynamically based on the state of the QWidget or by simply toggling both at the same time. Upon disabling/enabling the widget from somewhere just call QWidget::setToolTip(...) with the QString you want the tooltip to display when hovering with the mouse over the given widget. For example if you have a public slot called toggleButton(bool toggleFlag) which toggles the enable-setting of a button you can do:
void MyWidget::toggleButton(bool toggleFlag) {
this->ui->myButton->setEnabled(toggleFlag);
this->ui->myButton->setToolTip(toggleFlag ? QString("Enabled wohoo!") : QString("Disabled because I like it"));
}
You can of course do also change the tooltip by calling QWidget::isEnabled() and act upon its return value. Since you haven't given any code I can only assume how you toggle your button(s) so that's all I can give you for now.
UPDATE: It was pointed in the comments that tooltips don't work with disabled widgets due not receiving mouse events. Both statements are not true (note that I have used the same tooltip message since due to lack of minimal working example I didn't want to write a whole new project from scratch and used an existing one of mine instead):
Hovering a disabled button triggers the tooltip
Hovering an enabled button triggers the tooltip

Resources