Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Deleting tasks steals focus from "new task" input field #85

Open
schmittlauch opened this issue Oct 27, 2016 · 3 comments
Open

Deleting tasks steals focus from "new task" input field #85

schmittlauch opened this issue Oct 27, 2016 · 3 comments

Comments

@schmittlauch
Copy link

How to reproduce:

  1. start typing in a new task to add.
  2. delete an existing task
  3. wait for the remorse timer to finish

Expected behaviour: focus should stay where it is - in the input field
Actual behaviour: input field looses focus

@Armadill0
Copy link
Owner

Armadill0 commented Oct 28, 2016

Well there is a problem regarding the expected behaviour. The focus is being stolen by the item list after every change on the list. After adding a new task I'm forcing in a very bad hack the focus to the text field again.
But if a user only wants to delete a task the focus shouldn't always being forced back to the text field. Afterwards the keyboard will be opened and only half of the tasks would be visible. This could get quite annoying I think.

I'll have look over the focus issue soon. Maybe I have an idea how to fix this. Could have something todo with this: https://github.com/Armadill0/harbour-tasklist/blob/master/qml/pages/TaskPage.qml#L278

@schmittlauch
Copy link
Author

I'm really new to Qt and QML, but wouldn't it be possible to look whether the input field had focus before and only forcing it back if that was the case?

@Armadill0
Copy link
Owner

It would maybe possible if you catch every onFocusChanged event (I assume there is such an event for each item) and run a global function which saves the last focused object in a global variable or something like that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants