#885 Space key moves to next unread item when editing feed node

closed
5
2012-09-23
2006-12-26
Dare Obasanjo
No

When I edit a category or feed name with F2, and press space in the name, this will jump to next unread item instead of putting a space in the name. Obviously, the functionnality of Space to jump to next unread item should be disabled when editing a field.

I looked at the code and the problem seems to be at

=== CODE SNIPPET STARTS ===

else if ((msgKey == Keys.Space && Control.ModifierKeys == 0) || _shortcutHandler.IsCommandInvoked("MoveToNextUnread", m.WParam))
{ // Space: move to next unread

                    if (this.listFeedItems.Focused || this.treeFeeds.Focused &&
                        !(this.TreeSelectedFeedsNode != null && this.TreeSelectedFeedsNode.IsEditing)) 
                    {

=== CODE SNIPPET ENDS ===

The problem seems to be that this.treeFeeds.Focused returns false AND this.TreeSelectedFeedsNode.IsEditing also returns false.

Discussion

  • Dare Obasanjo
    Dare Obasanjo
    2006-12-26

    Logged In: YES
    user_id=24549
    Originator: YES

    I was incorrect. The problem code is

    else if (_docContainer.ActiveDocument == _docFeedDetails && !this.listFeedItems.Focused)

    because this.treeFeeds.Focused returns false.

     
  • Dare Obasanjo
    Dare Obasanjo
    2006-12-26

    Logged In: YES
    user_id=24549
    Originator: YES

    Fixed.

    My comments above were misleading. The main problem seems to be the line

    if (sender is AppContextMenuCommand)
            guiMain.CurrentSelectedFeedsNode = null;
    

    which meant that in PreFilterMessage, there was no handle to the node currently being edited so we always assume that no edit is taking place.