On the iPad, if a QML TextInput or TextEdit gains focus, the soft keyboard appears and the app content slides up as necessary so that both the text input field and the soft keyboard are visible.
On a Windows Surface Tablet, in tablet mode, Qt supports automatic showing of the soft keyboard, but the app content does not automatically slide up and the input field can be hidden behind the keyboard.
Is there a way to make the app content slide up automatically as it does on the iPad? Or is there a way to detect the presence and dimensions of the soft keyboard so that I can handle the slide up manually in code?
NB: the automatic showing of the soft keyboard on Windows in tablet mode was reported broken in this bug report (reported as early as Qt 5.3.2) but has been fixed as of Qt 5.11.2. Note also: these bugs affected Qt Widgets class QLineEdit also, and my issue may relate to that too but I have not tested it with Widgets.
Related
Setup: Our RN (0.61.5) app is using react-native webview#8.0.6 to display content and interact with the user. The app includes some text input fields, swipe guestures, buttons, longpress actions. As of iPad os 15.1 a text selection magnifier has been reintroduced in the OS.
Problem: The little text selection magnifier capsule is popping up on every long-press inside the Webview. It happens on divs, icons, text, does not matter what you press. user-select: none; does not seem to affect it as well. It's been set for the body of the document which results in no text getting selected, but magnifier still shows up every time. Does not break anything but our app does not benefit from it either.
Question: Is there any way to disable this new text-select magnifier for the Webview?
Thanks
My actual application is using a bluetooth scanner in HID mode and capturing the input on the DispatchKeyEvent of the MainActivity. It works great except that the screens dims to some dark opaque color where it looks like everything is disabled and you have to navigate back to a page with an input control and tap on it to get the screen to go back to normal.
It's not as noticeable in the stock template but in my actual application (Screen shots at bottom) the dimming is very noticeable; it's a blue-gray opaque overlay that really stands out. I have no idea why it's like that. I'd almost just be happy if my actual app dimmed like the default forms sample.
Steps:
Make a Xamarin Forms app from one of the templates.
Change nothing.
Run simulator.
Press a button on your keyboard.
Result:
The screen dims and the soft keyboard does not popup.
Next Steps:
Add an Entry control. < Entry/> will do.
Click on it and the screen brightens back up.
Delete < Entry/>
Press a key on your keyboard and the soft keyboard pops up and the screen doesn't dim again.
What I want:
To know where the dim/overlay color/opacity is set so I can change it.
To not allow the soft keyboard to try and popup at all unless there's an entry field that has focus.
Here's screenshots from the default forms app:
Not Dim:
Dimmed after pressing the keyboard:
My actual test device is a Samsung Galaxy XCover Pro running Android 10.0. I'm working on porting a native Xamarin Android app to Forms so we can run it on iOS as well. I never had this issue with my android app and I'm not sure how to track down what's happening.
Here's a before pic. I've got an Entry field focused.
After scanning a barcode with my bluetooth scanner this happens:
There is NOT any overlay/modal boxview defined in the XAML. The overlay is nothing that I added. Though I seem to have done something to influence the color; I don't see anything in my styles.xml files that would change the color from the default light gray (as shown in the sample Xamrin Forms template).
I can reproduce this with a scanner on the "Welcome to Xamaring Forms!" as well, the screenshots don't really show the change in overlay color; its much more subtle; I really would like to know why in my app the overlay is so much more obvious.
I'm still annoyed it happens at all. But just in case anyone else using a
hardware keyboard as input (or a BT scanner connected as a HID) and you thought you'd be fancy and override one of the default styles and use a pretty green accent color like this: (though stupidOverlayColor has been changed to pink just to make sure I found the issue) - don't do it.
<!-- Base theme applied regardless of API level -->
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorControlHighlight">#color/stupidOverlayColor</item>
</style>
The moral of the story is that "colorControlHighlight" is evil and not to be overridden and used with hardware keyboards, unless you want your app to think the entire screen should get the highlight color after you scan a barcode like this:
I'm building an electron app designed to run full screen on an MS Surface tablet. The app needs to function with the attachable hardware keyboard, and with the onscreen "soft" keyboard.
The problem is that the soft keyboard is often displayed over the fields being edited! How do I prevent this?
It doesn't look like the viewport is resized like it is on mobile.
Does the keyboard showing emit any kind of event I can catch and change the size of or move my form to accommodate it?
Thanks.
Electron doesn't provide APIs to control or detect soft (virtual) keyabords. When it comes to opening/closing soft keyboards, Chromium is responsible for handling everything. So, it's actually a Chromium issue. Unfortunately, Chromium doesn't emit an event for opening/closing soft keyboards.
You may want to track the issue at:
https://github.com/electron/electron/issues/6430
I have my macbook pro hooked up to an apple cinema display. I want to work on my code on the laptop but have interface builder on the cinema display. It needs to be this way because my laptop screen doesn't have the resolution to show a full iPad interface layout in IB so I would need to scroll up and down.
The thing I am fighting with is that whenever I open a XIB, or when IB starts, it places any new app windows back on my laptop screen. Is there any way to define a window layout for IB to use, and tell it to start all windows on my second screen by default? Thanks
Unfortunately Interface Builder does not currently save window positions (which include what screen they're on).
You might have limited success using Spaces, which assigns specific applications to specific spaces, but I'm not sure how it would work with multiple screens.
QtWebEngine (tried 5.9.2, 5.9.3, 5.9.10) does not obey macOS scrollbar setting to auto-show scrollbars. The scroll-indicator is always visible. We're seeing it in a C++ Qt app, but happen elsewhere, such as in the Qt sample quicknanobrowser. Non-Qt Chromium based apps such as Electron (and Chrome itself) behave correctly.
Anybody found a way to work around this with Qt-supplied binaries?
Quicknanobrowser example:
And in our product where it's particular ugly:
I opened a Qt issue: https://bugreports.qt.io/browse/QTBUG-65745
More detail on expected behavior: macOS system preference Show scroll bars is set to Automatically based on mouse or trackpad: a scrollable control should hide the scrollbar until you begin scrolling with trackpad or a mouse with scrolling capability. Then it will show a scroll-indicator, and if you mouse over that it turns into a scrollbar.