[
https://issues.apache.org/jira/browse/PIVOT-675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12964410#action_12964410
]
ocean commented on PIVOT-675:
-----------------------------
After digging around and playing with your example application I realized that
this problem only happens when the action is triggered via a context menu.
There are two ways to initiate the action that brings up the dialog: the user
can double-click on a row in a TableView or they can right-click on the
TableView and then click 'Edit Selected' from a popup menu. When the user
double clicks the result is a dialog that behaves as expected, it has focus and
it's window titlebar is blue. When the user brings up the dialog via the
right-click popup menu the resulting dialog has focus but it's window titlebar
is not blue.
I don't see any reason in this code why this behavior should occur. The only
thing I can guess is that possibly when a context menu is shown it interferes
with calculations about what is the active window. For example, I just realized
that getWindow is actually an ancestor-search and implemented in Component like:
public Window getWindow() {
return (Window)getAncestor(Window.class);
}
I will try passing in a concrete, known window instance and not rely on
Component.getWindow that seems to behave strangely in the presence of context
menus.
> Dialog does not become the Active Window
> ----------------------------------------
>
> Key: PIVOT-675
> URL: https://issues.apache.org/jira/browse/PIVOT-675
> Project: Pivot
> Issue Type: Bug
> Affects Versions: 1.5.2
> Reporter: Bo
> Attachments: DialogTest.java
>
>
> EntryEditorPanel entryPanel = EntryEditorPanel.create();
>
> Dialog dialog = new Dialog(entryPanel, true);
> dialog.setTitle("New Entry");
> dialog.open(getWindow());
>
> dialog.requestActive();
> dialog.requestFocus();
> ----
> After the above code is executed the component in the dialog has the focus
> and behaves like the active window but it's windows titlebar is still
> grayed-out, it's not blue as you would expect. If you then click on the
> window it's titlebar becomes blue. This is a bit confusing and not the
> behavior you'd expect.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.