kimai icon indicating copy to clipboard operation
kimai copied to clipboard

Start time tracking auto-focus Duration prevent click to Customer filed

Open ETNyx opened this issue 1 year ago • 5 comments

Describe the issue

When you start new tracking using top right button play. Pop up dialog is shown. There is auto focused first empty input - Duration. In case you want to set up Customer first and you click to this filed right bellow Duration, there is some hidden select that will fill Duration instead of showing available Customers.

Linux platform and Firefox 122 affected, Chrome 120 not affected. Mac platform and Safari 14 affected, Chrome 121 not affected.

Included zip contains screen capturing of this issue from demo application from your website.

2024-02-20 12-47-02.zip

I already tried

  • [X] I've read and searched the documentation.
  • [X] I've searched for similar issues in this repository.
  • [X] I've searched for similar issues in the discussions.

Kimai version

2.10.0

How do you run Kimai?

Docker

Which PHP version are you using?

8.2

Logfile

No response

Screenshots

No response

ETNyx avatar Feb 20 '24 12:02 ETNyx

Tested on Safari 17.2.1, Brave 1.62.xxx and Firefox 122 on latest Mac Sonoma 14.2.1 => works as expected.

Cannot reproduce.

kevinpapst avatar Feb 20 '24 14:02 kevinpapst

You are correct, just did test on latest Mac, Windows and Linux and only one affected is Linux and just Firefox. Just made a new recording and it's more likely system issue because it's not affecting drop-down made by page, but auto whispering my previous values (or how to call it), possible solution would be autocomplete="off" just not sure if it is the right one 2024-02-22 10-20-56.zip

ETNyx avatar Feb 22 '24 09:02 ETNyx

Hm... interesting. Thanks for the detailed tests!

While I agree that autocomplete="off" is not really required for that field, I find myself often choosing a previous entered value from the auto-complete suggestion.

Does that happen if you enter a duration first?

Right now I see an issue that only exists for a small minority of users. And on top it only triggers for a specific click order.

You could try to path the lines at: https://github.com/kimai/kimai/blob/main/src/Form/TimesheetEditForm.php#L289

            'attr' => [
                'placeholder' => '0:00',
                'autocomplete' => 'off',
            ],

and see if that fixes your issue.

Back in 2000 when I started WebDev, we had to implement weird workarounds for browsers all the time. But nowadays I am not willing any longer to work around browser bugs. But this works in Safari as well, which is not using the chrome/blink engine, so I suspect this is a very edge-casy glitch in the Wayland-Firefox combination (or something along that line).

I understand it is annoying if you are hit by that bug, but I don't think I will change anything about it yet, unless more people show up and report problems.

kevinpapst avatar Feb 22 '24 09:02 kevinpapst

Yes, I agree whit you at all points. It's strange edge case, at this time not worth to fixing, because proposed fix will most likely made more issue.

My workflow is click on that top button, fill customer, project, work. Than work for client and click that top button to stop it, to auto fill time. Using this for 99% times. If I enter some duration autocomplete is reduced or disabled depend on what is left, so click to Customer is mostly fine (got 3 time in duration for autocomplete), because there is no invisible autocomplete dialog.

I just add autocomplete="off" via developer console and it fix this for me, so I will write small script to correct this just for me inside browser.

Anyway thanks for your time. Kimai is great project. Please close this issue, if you see it fit :-)

ETNyx avatar Feb 22 '24 10:02 ETNyx

Let's leave it open for now, maybe someone votes or adds something new. We can still close it later.

kevinpapst avatar Feb 22 '24 10:02 kevinpapst