Summary: | Dragging Folder View items over sticky note makes them all disappear except one (until restart) | ||
---|---|---|---|
Product: | [Plasma] kdeplasma-addons | Reporter: | ratijas <me> |
Component: | notes | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate, plasma-bugs, severinvonw |
Priority: | HI | ||
Version: | master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kdeplasma-addons/commit/e6fc3c0015dc18ea0c901480c1fe5db86b0a2396 | Version Fixed In: | 5.24.1 |
Sentry Crash Report: | |||
Attachments: | Plasma desktop containment - disappearing icons and binding loop in FolderItemDelegate for verticalAlignment |
Description
ratijas
2022-02-06 18:19:18 UTC
Actually, might happen with a single row of multiple items as well. It seems like it has something to do with the Sticky Notes widget. If I drop icons near that widget they disappear entirely. > It seems like it has something to do with the Sticky Notes widget. If I drop icons near that widget they disappear entirely.
Or even just dragging around and over it but dropping in entirely different place far away from it
I think I've found the culprit: https://invent.kde.org/plasma/kdeplasma-addons/-/blob/2c39c2051d9c7fc9e2e5c28c1d0ed44ea582ccd6/applets/notes/package/contents/ui/main.qml#L354 If you remove that line the text area won't get focused anymore if you drag items over the notes widget. But it resolves the disappearing icons issue. > I think I've found the culprit:
> If you remove that line the text area won't get focused anymore if you drag items over the notes widget. But it resolves the disappearing icons issue.
Great job! Now, I don't have much experience with drag & drop in QML, and I wonder why that manual focusing is even needed?
AFAICT all other apps handle this by just drawing a cursor without focusing the text field when you drag something over it; and if you release inside, it would insert the content, and then depending on a GUI framework some apps will even set focus to this text field.
Indeed, seems unnecessary. Wanna test out removing to make sure nothing breaks, and then submit a merge request for it? A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/113 Git commit cd39585efa070291964db3e2d45319bc1ee34e06 by Severin von Wnuck. Committed on 07/02/2022 at 20:12. Pushed by ngraham into branch 'master'. [applets/notes] Fix drag-and-drop focus stealing The sticky note widget focuses the text area when dragging desktop icons over the widget. This can cause the desktop icons to disappear once they are dropped on the desktop. M +0 -1 applets/notes/package/contents/ui/main.qml https://invent.kde.org/plasma/kdeplasma-addons/commit/cd39585efa070291964db3e2d45319bc1ee34e06 Git commit e6fc3c0015dc18ea0c901480c1fe5db86b0a2396 by Nate Graham, on behalf of Severin von Wnuck. Committed on 07/02/2022 at 21:50. Pushed by ngraham into branch 'Plasma/5.24'. [applets/notes] Fix drag-and-drop focus stealing The sticky note widget focuses the text area when dragging desktop icons over the widget. This can cause the desktop icons to disappear once they are dropped on the desktop. (cherry picked from commit cd39585efa070291964db3e2d45319bc1ee34e06) M +0 -1 applets/notes/package/contents/ui/main.qml https://invent.kde.org/plasma/kdeplasma-addons/commit/e6fc3c0015dc18ea0c901480c1fe5db86b0a2396 |