Comment 11 for bug 900602

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

@cadabra - I have tried to find older discussions about when/why the line of code your patch comments out (to prevent the focus from being returned to the canvas) had been added (with limited success). A short discussion during the major rewrite of the font selector widget for Inkscape 0.47 can be found e.g. in the comments of Bug #168161 (comment #30 and below):

bbyak wrote on 2009-05-26:
> Felipe "Juca" Sanches wrote on 2009-05-26:
>> bbyak wrote on 2009-05-26:
>>> - type some text, select it, open the drop-down, navigate by keys, press
>>> Enter. The font is assigned. Now press left-arrow - instead of moving
>>> text cursor, it highlights the font name in the toolbar. To fix,
>>> whenever you close the drop-down, either by choosing a font or by
>>> escaping, you must pass focus to the canvas - see spinbutton_defocus for
>>> how to do this.
>>
>> There is one issue with grabbing focus to canvas. One user told me he
>> would like to select the text, then select a font and then keep
>> switching fonts with up/down arrow keys so that he can decide which font
>> looks good in his design. It seems to be a reasonable request.
>
> Absolutely! That is the best thing about your patch :) Let's not lose
> this capability whatever else we fix. I was only speaking about moving
> focus to canvas when you _close_ the drop-down.

Apparently the feature mentioned by Felipe to scroll through the list of fonts with arrow up/down keys got lost due to later changes (it works as described in Inkscape 0.47 but no longer in Inkscape 0.48.0 and current trunk). The statement by bbyak about the focus having to move back to the canvas when the drop-down is closed (i.e. a font family is actually selected) is unambiguous though AFAIU.

Expected behavior (AFAIU):
Edit a text object on-canvas, move focus with 'Alt+X' to the font selector ->
a) use arrow keys to switch through the list of fonts, select a new font with <Return>
-> focus is moved back to canvas to the text object currently being edited.
b) use the type-ahead feature to get a drop-down list with matching fonts, select a new font with the arrow keys, press <Return>
-> the drop-down list is closed and the focus moved back to canvas to the text object currently being edited.
See also:
<http://wiki.inkscape.org/wiki/index.php/Release_notes/0.47#Text_tool>

I'm proposing to revert the commit of the current patch - the goal ought to be to restore the features from Inkscape 0.47 (which seem to have been lost in Inkscape 0.48 - possibly during the conversion of the text toolbar to a GTK toolbar, or when adding new features to the GUI of the text tool), without introducing new regressions (e.g. interrupting keyboard-based workflows while editing and formatting text content).