Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed FocusChanged and get back to old logic for SelectedPane #105

Closed
wants to merge 1 commit into from

Conversation

anovik
Copy link
Owner

@anovik anovik commented Oct 9, 2024

Due to conflict of FocusChanged with Avalonia message boxes.

Fix for #102

…se new focus logic worked badly with Avalonia message boxes.
@anovik
Copy link
Owner Author

anovik commented Oct 9, 2024

@Diaskhan could you please review the PR, it partly reverts your logic but according to my testing all keys/tabs are still working correctly. But now we can delete items without switching to the second pane in process.

@Diaskhan
Copy link
Contributor

Diaskhan commented Oct 9, 2024

I wouldn recomedned to revert that,
Could U descibe bug in details ?
The problem, with hotkeys, it that commands Enter,Backspace, Delete must be binded careffuly,

public void dataGrid_PreviewKeyDown(object? sender, KeyEventArgs e)

FilePane could be in Editing mode, when we are renaming files (in place editor).

Only way to procces that key correctly is to use dataGrid_PreviewKeyDown and
PaneDataGrid.AddHandler(KeyDownEvent, dataGrid_PreviewKeyDown, RoutingStrategies.Tunnel);

In general when bind command they Events wont be sended to inplace editor! Buggy Avalonia

image

AvaloniaUI/Avalonia#12463

Please take a look a this
https://stackoverflow.com/questions/67335465/avalonia-datagrid-enter-handling
To understand a problem!

https://docs.avaloniaui.net/docs/concepts/input/routed-events

@Diaskhan
Copy link
Contributor

Diaskhan commented Oct 9, 2024

image

The best option to make focus on Delete Widow, when we are opennin them!
I fixed behaviour of Modal window for Configuration, but maybe for other Is still persists!

@Diaskhan
Copy link
Contributor

Diaskhan commented Oct 9, 2024

Better solution is to refactor fix behaviour of

when we hit MessageBox, focus is still on mainwindow!

in TC focus is default on Yes button

image

@anovik
Copy link
Owner Author

anovik commented Oct 9, 2024

I know the focus problem in message boxes for Avalonia, it seems there is no way for now to set focus correctly.

@Diaskhan
Copy link
Contributor

Diaskhan commented Oct 9, 2024

check new PR
#106
run test the behavoiur

@anovik
Copy link
Owner Author

anovik commented Oct 10, 2024

ok, I agree, let's go with changing Messagebox function. I will close this PR.

@anovik anovik closed this Oct 10, 2024
@anovik anovik deleted the focus branch October 13, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants