diff options
author | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-09-15 11:40:43 +0200 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-09-15 13:25:52 +0000 |
commit | b47ac20e368dce3bbf89bc724600703cd33cb168 (patch) | |
tree | b8b3ef1eb6afe4f9c78ccfcaa5925db2a1536fb6 /src/imports/controls/GroupBox.qml | |
parent | 175dc7d516740a8964a859e4d7b5daaf41ef98d0 (diff) |
Ensure press-and-hold event keeps selection
This concerns TextField and TextArea.
It is an almost universal UX pattern on touch platforms where
the user long presses to pop the context menu up. In many
cases the context menu is used for copy and cut operations,
which means that poping it up should keep the selection.
The implementation works by not forwarding the initial mouse
press event to the parent class until we're sure it's not going
to be a long press. If the long press timer is cancelled for any
reason, we will then send the delayed mouse press event to the
parent class followed by whichever event triggered the cancellation.
Auto-tests refactored and updated.
Change-Id: If3aa8075f07a80929f4bd723895d9599bf8d169e
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/GroupBox.qml')
0 files changed, 0 insertions, 0 deletions