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.
Related
I build a web-based Cocoa app that has a WebView stretched to the whole window. The top bar of the app has tabs, controls and some unused area which I would like to use for giving user an ability to drag the window (like many apps do). Chrome apps and Electron have -webkit-app-region: drag CSS property for doing this. What about WKWebView in Cocoa?
Make sure that -[NSWindow isMovableByWindowBackground] is set. Then, assuming nothing on WKWebView consumed mouse events, the drag should work.
In my Xamarin Forms app, I have numerous TextCells displayed in a TableView.
When run the app on UWP, I see that the text moves slightly (slightly indented) when the cell is tapped on. I suspect this is done as a form of highlighting the cell when it is tapped.
I find this very distracting and is different from what happens on iOS or Android.
Is there a way to disable this behavior?
I've added drag and drop gesture to a xamarin forms app following microsoft doc :
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/gestures/drag-and-drop
Everything works as expected.
Drag is initiated by a long press.
I would like to change this behavior by initiating a drag with a short press.
Is it possible ?
I have a Java FX application in which I show a Popup that contains a text field. I intentionally keep this popup visible even when the user clicks away from it. This works fine except for one case:
When the user has focus on the text field in the Popup, then clicks on a separate application, and then clicks back onto the text field. The FX application does not regain focus from the OS. If the user types on the keyboard, the other application will still receive the keyboard input. To work around this, the user has to click on the main FX application window outside of the popup.
The strange thing is that, in debugging, I can see that the text field in the Popup is getting focus, but the OS does not show that the FX application is now in focus. Is there a way that I can force the OS to move focus to my application?
This occurs on Windows and Mac. I tested with jdk 8 update 45 and jdk 8 update 92.
I did a test with a minimum Popup:
static class TestPopup extends Popup {
TestPopup() {
content.add(new TextField("Hello"))
}
}
and I show it by calling:
new TestPopup().show(somePaneInMainWindow, 0, 0)
After some research I found that this is expected behavior.
Answer found here:
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8123137
From the link:
This is the right behavior. All the JavaFX popup windows are
unfocusable, so they can receive input only if the owner window is
currently focused. Usually popups are set to auto hide, when the owner
gets unfocused, but this is not the case in this test, so the popup
just stays around.
Is there a way to make the taskbar item flash in an AIR app? like it does in other applications to alert the user of a change.
Thanks!!
You need to call:
stage.nativeWindow.notifyUser(NotificationType.CRITICAL);
Just to put some more info, the notification types that can be used here are:
NotificationType.CRITICAL: the window icon flashes until the
user brings the window to the foreground.
NotificationType.INFORMATIONAL: the window icon highlights by changing color.
There's an article on livedocs about using Taskbar here