1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-31 03:00:05 +00:00
JUCE/modules/juce_gui_basics/widgets
reuk 2fc7d12ae7 TextEditor: Add option to dismiss the virtual keyboard on touches outside
Previously, individual components had to ask the peer to hide and show
the keyboard, by calling textInputRequired() and
dismissPendingTextInput() respectively. When an onscreen keyboard (OSK)
was required, most Peer implementation would directly hide/show the OSK
inside these function. However, the iOS ComponentPeer implementation
instead listened to the application's global keyboard focus, and only
opened the OSK when the focused component was also a TextInputTarget
with active input.

The iOS scheme seems like a better design, as it enforces that the OSK
hiding and showing is synced with the keyboard focus of the application.
In the other implementations, it was possible for a Component to call
textInputRequired even when it didn't have the keyboard focus, putting
the application into an inconsistent state. The iOS scheme also makes
the TextInputTarget interface more useful, as it enforces that the OSK
will only display for components that implement TextInputTarget, and
return true from isTextInputActive().

This patch changes all Peer implementations to match the iOS
implementation, improving consistency. Each time the global keyboard
focus changes, refreshTextInputTarget is called automatically, and the
OSK is shown if the focused component is a TextInputTarget that returns
true from isTextInputActive, and hidden otherwise. Components can also
call refreshTextInputTarget manually. This should be done whenever the
component updates the return value of isTextInputActive(). Effectively,
the Peer is now responsible for keeping track of the focused
TextInputTarget, rather than allowing individual components to hide and
show the OSK at will.

Additionally, this patch adds an option to the TextEditor to
automatically dismiss the OSK when the mouse is clicked outside of the
editor. This should improve user experience on mobile platforms, where
touches on sibling components may cause a TextEditor to gain keyboard
focus and unnecessarily display the OSK.
2022-06-08 19:51:11 +01:00
..
juce_ComboBox.cpp Accessibility: Update ComboBox label accessibility when editable state changed 2021-10-15 10:11:13 +01:00
juce_ComboBox.h Update code to use C++14 [[deprecated]] attribute 2021-09-29 16:14:00 +01:00
juce_ImageComponent.cpp Accessibility: Override Accessibility::getHelp() for JUCE widgets that support tooltips 2021-07-05 12:07:30 +01:00
juce_ImageComponent.h Accessibility: Make createAccessibilityHandler() private in Component subclasses 2021-09-07 11:23:17 +01:00
juce_Label.cpp TextEditor: Add option to dismiss the virtual keyboard on touches outside 2022-06-08 19:51:11 +01:00
juce_Label.h Accessibility: Make createAccessibilityHandler() private in Component subclasses 2021-09-07 11:23:17 +01:00
juce_ListBox.cpp TableListBox: Avoid calling virtual functions in constructor 2022-05-13 14:38:12 +01:00
juce_ListBox.h TableListBox: Avoid calling virtual functions in constructor 2022-05-13 14:38:12 +01:00
juce_ProgressBar.cpp Accessibility: Override Accessibility::getHelp() for JUCE widgets that support tooltips 2021-07-05 12:07:30 +01:00
juce_ProgressBar.h Accessibility: Make createAccessibilityHandler() private in Component subclasses 2021-09-07 11:23:17 +01:00
juce_Slider.cpp Accessibility: Use ignored AccessibilityHandler for slider text boxes to fix keyboard focus/accessible focus sync issue 2021-12-13 12:56:15 +00:00
juce_Slider.h Fix some typos 2022-01-25 11:48:46 +00:00
juce_TableHeaderComponent.cpp TableHeaderComponent: Avoid repainting in setColumnWidth if requested size is outside limits 2021-09-22 10:23:04 +01:00
juce_TableHeaderComponent.h Accessibility: Make createAccessibilityHandler() private in Component subclasses 2021-09-07 11:23:17 +01:00
juce_TableListBox.cpp TableListBox: Avoid calling virtual functions in constructor 2022-05-13 14:38:12 +01:00
juce_TableListBox.h Update code to use C++14 [[deprecated]] attribute 2021-09-29 16:14:00 +01:00
juce_TextEditor.cpp TextEditor: Add option to dismiss the virtual keyboard on touches outside 2022-06-08 19:51:11 +01:00
juce_TextEditor.h TextEditor: Add option to dismiss the virtual keyboard on touches outside 2022-06-08 19:51:11 +01:00
juce_Toolbar.cpp Toolbar: Add accessible name for custom popup menu item 2022-02-23 10:56:10 +00:00
juce_Toolbar.h Toolbar: Fix missing-items button when LookAndFeel changes after construction of toolbar 2022-02-23 10:56:09 +00:00
juce_ToolbarItemComponent.cpp DragAndDropContainer: Allow custom scaling 2021-12-01 15:35:54 +00:00
juce_ToolbarItemComponent.h Accessibility: Make createAccessibilityHandler() private in Component subclasses 2021-09-07 11:23:17 +01:00
juce_ToolbarItemFactory.h Updated all license headers 2020-06-29 08:30:22 +01:00
juce_ToolbarItemPalette.cpp Accessibility: Added VoiceOver (macOS) and Narrator (Windows) accessibility screen reader support to juce_gui_basics 2021-05-10 10:53:14 +01:00
juce_ToolbarItemPalette.h Accessibility: Make createAccessibilityHandler() private in Component subclasses 2021-09-07 11:23:17 +01:00
juce_TreeView.cpp MouseInputSource: Eliminate superfluous drag events caused by pressure change 2022-02-15 10:53:32 +00:00
juce_TreeView.h TreeView: Allow built-in mouse handling to be enabled/disabled for custom components 2022-01-28 16:09:59 +00:00