Focus issues with new gradient (and swatch) manager in Fill&Stroke (trunk)

Bug #1067808 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
John Smith

Bug Description

The list of available gradients (or custom swatches) in the 'Fill & Stroke' dialog appears to require an extra click to receive mouse focus. If the user does not take this into account e.g. after having changed the current selection on-canvas (current mouse focus is on-canvas, not in Fill&Stroke), the first mouse click on a gradient in list moves mouse focus to the list and auto-selects the first (top-most) item in the list instead of the one the user clicked on.

This is confusing and not transparent to the user, especially if the list of gradients is long, and can cause the impression of data loss (a currently used gradient might get unreferenced (and auto-cleaned) prematurely without the user seeing the actually intentioned result).

Workaround: each time after having changed the current selection on-canvas, click first on the highlighted gradient in the list of gradients (makes sure to have the mouse focus on the list), and only then click on the intentioned other gradient to switch the current fill (or stroke) to.

Steps to reproduce:
0) reset Inkscape's preferences to default
1) open attached drawing in current trunk
2) open Fill & Stroke dialog
3) select the rectangle with the blue gradient fill in the
   upper right corner
4) change its gradient to the one labeled 'cyan' by clicking on the
   color swatch (or gradient name) right below the current highlighted
   one (labeled with 'blue') in the gradient manager list displayed
   in Fill & Stroke

Expected result:
The gradient fill of the rectangle is changed to use the cyan gradient.

Actual result:
The gradient fill of the selected rectangle changes to a red reversed gradient (the top-most one in the gradient manager list of Fill&Stroke after the initial loading of the document in the current session).
The gradient list is scrolled to the top to show the now selected entry ('red_reversed'), and the gradient the user actually clicked on ('cyan') has scrolled out-of-sight.
The original gradient 'blue' disappears from the list (auto-cleaned, because no longer referenced), and a casual user initially has no idea what has happened.

Reproduced with Inkscape 0.48+devel r11806 on OS X 10.7.4 with
- GTK2/X11 2.24.13, gtkmm 2.24.2, glib 2.32.4
- GTK+/Quartz 3.6.1, gtkmm 3.5.13, glib 2.34.1

Tags: gradient ui
Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Not reproduced with Inkscape 0.48+devel r11806 on Ubuntu 12.10 (Unity), installed in VirtualBox.

I wonder what makes this issue OS-specific (apparently independent of the backend used for GTK+)?

Revision history for this message
su_v (suv-lp) wrote :

Attaching a montage of 3 screenshots showing what actually happens on OS X [1]:
User action:
1) open sample file
2) open fill & stroke (Shift+Ctrl+F)
3) click on rectangle with blue gradient
--> screenshot
4) click on 'cyan' gradient in the list of Fill&Stroke
--> screenshot
5) undo once (Ctrl+Z)
--> screenshot

What actually seems to happen (according to the Undo history):
1) the gradient is changed to 'cyan'
2) immediately after that the top-most entry of the list gets selected (-> the gradient for the current selection is changed a second time). This happens without user interaction, immediately after having clicked once on the targeted gradient ('cyan') .

---
[1] this time using Inkscape with built-in stock gtk settings (no user or system gtkrc file), and new default preferences

Revision history for this message
su_v (suv-lp) wrote :

@JazzyNico - any chance you could test whether this affects Windows builds as well?

Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape trunk revision 11805.
Not reproduced on Ubuntu 11.04, revision 11806.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
John Smith (john-smithi) wrote :

Should be fixed in r11819.
Tested on Windows 7.

Changed in inkscape:
assignee: nobody → John Smith (john-smithi)
status: Confirmed → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

John Smith wrote:
> Should be fixed in r11819.
> Tested on Windows 7.

Fix confirmed on OS X 10.7.4 (X11 as well as Quartz backend). Many thanks :)

Changed in inkscape:
milestone: 0.49 → none
Revision history for this message
su_v (suv-lp) wrote :

Reopening - the current fix seems to have introduced a (major) focus regressions on OS X:
If the 'Fill and Stroke' dialog is open and displays a list of gradients or custom swatches, the mouse focus is instantly forced to return to 'Fill & Stroke', which makes using keyboard shortcuts either fails (e.g. zoom shortcuts trigger the search-ahead feature of the gradient (or swatch) list in Fill&Stroke, unless one uses <esc> twice first), or keyboard commands (e.g. moving with arrow keys or cycling through the selection with <TAB>) cannot be used repeatedly - the second time the key is pressed, it is captured by the 'Fill & Stroke' dialog.

Not reproduced with r11817, reproduced with r11819 on OS X 10.7.4.

@JazzyNico - can you confirm with Windows builds?

Changed in inkscape:
milestone: none → 0.49
status: Fix Released → New
Revision history for this message
su_v (suv-lp) wrote :

Also reproduced with Inkscape 0.48+devel r11826 on Ubuntu 12.10 (VM).

Steps to reproduce:
1) launch Inkscape with default preferences
2) draw rectangle
3) open Fill&Stroke and convert fill to linear gradient
4) click on rectangle (to move focus back to canvas)
5) use arrow keys repeatedly to move the object on-canvas

Expected result:
The object moves with each key press

Actual result:
Only the first time an arrow key is pressed, the object is moved, subsequent key presses are captured by the Fill&Stroke dialog (with no effect). To use an arrow key again, one first has to press <esc> once.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP, Inkscape trunk revision 11829.

Revision history for this message
John Smith (john-smithi) wrote :

Focus issue should be fixed in r11842.
Tested on Windows 7 and Ubuntu 12.04.
Apologies for the regression.

Changed in inkscape:
status: Confirmed → Fix Released
su_v (suv-lp)
Changed in inkscape:
milestone: 0.49 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.