6
Vote

Focusing issue when having floating documents

description

When having a floating document which is in focus and clicking on a menu item in the main window (or any other control not in a document or acnhorable) the focus is not set correctly.

Steps to reproduce:
  • Run MVVMTestApp
  • Open two documents
  • Float one of them
  • Click on the "Tools" menu, and it opens correctly.
  • Now, click inside the docked document (focusing its TextBox)
  • Click on the floating document
  • Click on the "Tools" menu, and it does not open instead focus is set to the TextBox inside the docked document.

comments

bruceboughtonlbg wrote Jun 19, 2013 at 10:28 AM

I see this problem too. It is especially important with the application main menu.

It seems to be triggered by: LayoutDocumentControl.OnPreviewGotKeyboardFocus:
if (Model != null)
    Model.IsActive = true;
base.OnPreviewGotKeyboardFocus(e);

mgnu wrote Jun 24, 2013 at 1:03 PM

Pretty much the same issue as https://avalondock.codeplex.com/workitem/15976

Not solved, quite a lot of upvotes.