Bug 474809 - We cannot active the OK button pressing ENTER in windows we resize image/canvas
Summary: We cannot active the OK button pressing ENTER in windows we resize image/canvas
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resize/Scale Image/Layer (show other bugs)
Version: 5.2.0-rc1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-23 16:04 UTC by garuda1300
Modified: 2024-11-15 10:07 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description garuda1300 2023-09-23 16:04:24 UTC
SUMMARY
Hello. In version 5.1.5 we could resize image/canvas by changing width and/or height and just pressing ENTER. Now, press ENTER no longer works, even though we haven't made any changes. We need to use the mouse to click the OK button.


STEPS TO REPRODUCE
1. open the window to resize the image or canvas of an image
2. press enter when the window appear

OBSERVED RESULT
Nothing happens. The OK button is no longer "selected".

EXPECTED RESULT
pressing the ENTER button OK would work automatically.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: LINUX MINT 20.3

ADDITIONAL INFORMATION
We cannot use the TAB as a workaround, because it selects the OK AND the button that link Width with Height.
Comment 1 wolthera 2023-10-18 11:46:59 UTC
I can't seem to reproduce 'enter' not working when nothing is set, and while there *is* something odd going on with the tab-order in resize-canvas, I cannot get into a state where the ok button and the link-width-and-height buttons are both focused.

Is this with the appimage, or some other version?
Comment 2 garuda1300 2023-10-18 14:54:16 UTC
Hello wolthera,
this issue can be reproduced with 5.2.0 appimage. I'm using Linux Mint 21.1.
Comment 3 wolthera 2023-10-18 17:25:52 UTC
Linux mint provides various flavours, is this for example cinnamon or gnome?
Comment 4 garuda1300 2023-10-18 17:58:26 UTC
Ops, sorry. It's XFCE.
Comment 5 Bug Janitor Service 2023-10-19 03:46:24 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 6 Reinold Rojas 2024-11-14 03:04:51 UTC
I can reproduce this on the krita Next 84484d65d1. I also tried to replicate this in my docker container build of Krita and I wasn't able to reproduce it there. It seems something happens when its in an appimage that causes this bug.

Reproduce steps:
1. Got to Image ->rezise canvas
2. Press enter when the window appears (should close the window but nothing happens)
Comment 7 Dmitry Kazakov 2024-11-15 09:58:41 UTC
Hi, Reinold Rojas!

What desktop environment do you use? I seem to cannot reproduce the issue locally. 

The only way how I can reproduce the issue is when I click on any of the anchor buttons or on the lock buttons. Since these buttons are accessible using Tab-focus, they steal focus from the OK button until you click something else (e.g. the text spin-box). The only way we can fix that is by converting them into QToolButton, which would make then inaccessible from the Tab-focus. I'm not sure if it is a desired behavior though.
Comment 8 Dmitry Kazakov 2024-11-15 10:07:42 UTC
Git commit 0b74dcd90886c2143d38e95359a0f1622bc7d598 by Dmitry Kazakov.
Committed on 15/11/2024 at 10:06.
Pushed by dkazakov into branch 'krita/5.2'.

Fix focus issues in Canvas Size dialog

1) Make sure that anchor and lock buttons don't steal focus from the OK button
    (they should be available via Tab-focus only)
2) Change the tab-order of the widgets to be more consistent

M  +36   -1    libs/ui/imagesize/wdg_canvassize.ui

https://invent.kde.org/graphics/krita/-/commit/0b74dcd90886c2143d38e95359a0f1622bc7d598
Comment 9 Dmitry Kazakov 2024-11-15 10:07:56 UTC
Git commit cd7b48348ce7bdad61a86b499410550acfa59062 by Dmitry Kazakov.
Committed on 15/11/2024 at 10:07.
Pushed by dkazakov into branch 'master'.

Fix focus issues in Canvas Size dialog

1) Make sure that anchor and lock buttons don't steal focus from the OK button
    (they should be available via Tab-focus only)
2) Change the tab-order of the widgets to be more consistent

M  +36   -1    libs/ui/imagesize/wdg_canvassize.ui

https://invent.kde.org/graphics/krita/-/commit/cd7b48348ce7bdad61a86b499410550acfa59062