Double clicking on text edit controls doesn't select the full word #84830
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
11 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#84830
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.09
Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-01-18 13:07, hash:
3584f1d224
2.91 release
Worked: unknown
Short description of error
Double clicking on text edit controls doesn't select the full word.
Exact steps for others to reproduce the error
Just open the default blender and try to select the cube name on the properties, please place the mouse cursor in the middle of the Cube word, and double click.
e8rUuja443.mp4
Added subscriber: @dgsantana
#102207 was marked as duplicate of this issue
Added subscriber: @filedescriptor
Changed status from 'Needs Triage' to: 'Confirmed'
I found a way to reproduce this: If I use my mouse, double-clicking will always select the whole word but when I use my tablet pen, it does not.
First with the mouse, then with tablet pen Peek 2021-01-18 19-33.webm
OS: Linux 5.8.0-7630-generic
I do have a wacom tablet, but I use a regular mouse, most the time, and the video was done with the mouse.
I noticed this first on the file browser, where I normally "pick"/double click to replace words.
Added subscriber: @PrototypeNM1
Verified this issue (for tablets) predates Blender 2.92, thus is unrelated to recent Wintab changes.
Added subscriber: @ideasman42
Suspect this issue is small mouse-move events cause the word selection to be lost.
We could ignore dragging after a double-click event.
Added subscriber: @HooglyBoogly
In other applications, double clicking enters "word select mode", where dragging will select words instead of letters. Might be worth supporting that, since it's much more intuitive than ignoring drags.
Supporting select-word drag would be nice but more of a TODO, this could be solved separately if a small patch resolved this report.
Added subscriber: @Harley
Only mentioning the following because I don't see it noted here.
I agree that double-clicking on a word should select the entire word, but currently individual words can be selected if you do so at the end of the word. Again, mostly mentioning this in case it is a clue to the behavior and how it can be fixed or improved.
Added subscriber: @deadpin
A git bisect shows that
d5c59913de
is the first bad commit.I can recreate the issue in 2.91 release, predating this commit. More likely the issue is more reproducible due to higher frequency input, maybe relates to how the operator handles coalesced mouse input?
Notably, the whole word is selected followed by a snap back to the cursor.
Additionally with mouse input, double click and hold followed by mouse moves results in inconsistent behavior as you move back and forth.
Added subscriber: @JulianEisel
The mentioned commit may indeed have made this issue more noticeable, but only on Windows (since it only affects Windows code).
To recap:
So my first suspicion is that the double click check for some reason fails for high frequency input (
INBETWEEN_MOUSEMOVE
?), which is typical for tablets and apparently now for mice on Windows too (? The commit is not clear on that to me).I can't recreate this with mouse or touchpad here (macOS). Don't have access to a tablet to test. So I didn't actually debug this.
More context: I can reliably recreate the issue on Blender 2.82 by double clicking while slightly moving the mouse.
I think I know what's happening now. Either the way the window manager handles generating double click events or the select full word operator's implementation are reliant on the assumption of no mouse move events are generated between the two clicks or that no mouse events are generated during a single click (press and release). What changed in the high frequency mouse input commit was that mouse moves are generated in more cases, sometimes redundantly when no mouse move has occurred.
I can modify how mouse events are generated in Ghost to check that the mouse actually moved before creating an event, after testing this did fix the issue. This however won't address tablet input which by it's nature tends to move during a double click.
I'm not sure how the select full word operator is implemented, afaik it could be re-implementing double click instead of subscribing to the Window Manager generated events. Depending on that would impact how best to proceed.
I can redo this on a regular linux/X11 setup with a mouse (although not every time).
A straightforward fix for this would be to apply some threshold for mouse-movement after a double-click.
Added subscriber: @VincentBlankfield
This is caused by
MOUSEMOVE
events happening beforeKM_RELEASE
. On Windows I always get the events in this order:KM_DBL_CLICK
,MOUSEMOVE
,KM_RELEASE
.MOUSEMOVE
happens even if the mouse didn't move. Clicking a touchpad button without touching the touchpad still generates it, for example.Problem
In
ui_do_but_textedit
this part will select a word and leave the button inBUTTON_STATE_TEXT_SELECTING
state:In
ui_do_but_textedit_select
this part will deselect a part of the word after the cursor position onMOUSEMOVE
, before theBUTTON_STATE_TEXT_SELECTING
state is exited onKM_RELEASE
event:Possible solutions
MOUSEMOVE
s before theKM_RELEASE
. This is unreliable, because a real small movement may happen.ui_do_but_textedit_select
andui_do_but_textedit
. May be something like this:Without looking at the relevant operator code further than @VincentBlankfield's excellent analysis, I think you could implement word drag select (and paragraph select) by separating the drag select origin into left/right origins.
@VincentBlankfield in case you didn't want to submit a patch, I'd be interested in implementing this. There's a reasonable path to a robust fix; in the case I don't have time before 2.92 release there's a simple way to return to the prior state of things (make Ghost filter out non-moving mouse move events).
Note,
2e81f2c01a
returned Blender to the same behavior as present in 2.91.I'm leaving the issue open for now as double click selection behavior could still be improved, but the remaining issue is no longer a regression.
Added subscriber: @PratikPB2123
Report is not appearing in normal searches and issue is not particular for 2.93 so I'm removing
BF Blender (2.93)
Added subscriber: @lichtwerk