Bug 133891 - GalleryIconView should Select items on MouseButtonDown, wrong gallery graphic gets dragged & dropped
Summary: GalleryIconView should Select items on MouseButtonDown, wrong gallery graphic...
Status: RESOLVED DUPLICATE of bug 134285
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-11 10:58 UTC by himajin100000
Modified: 2020-06-25 20:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description himajin100000 2020-06-11 10:58:54 UTC
Description:
See steps to reproduce

Steps to Reproduce:
Steps A:

0. Preferable if profile is reset. (because the gallery is a new feature and with data, but its preset items may not be copied to your profile if the profile is not renewed.)
1. Open Writer
2. Select "Gallery" from sidebar icons
3. Select something, namely "Arrows" from the listbox
4. Click "Icon View" button below the listbox.
5. Trigger MouseButtonDown on an item with a tooltip "curved-left-arrow"
5-a. DONT trigger MouseButtonUp on the Icon View.
6-a. Do nothing
7. Start Dragging the item to the document, and you can unhold the left mouse button.

====================
Steps B( for comparison)
0. Preferable if profile is reset.
1. Open Writer
2. Select "Gallery" from sidebar icons
3. Select something, namely "Arrows" from the listbox
4. Click "Icon View" button below the listbox.
5. Trigger MouseButtonDown on an item with a tooltip "curved-left-arrow"
5-b. DO trigger MouseButtonUp on the Icon View.
6-b. Trigger MouseButtonDown again on an item with a tooltip "curved-left-arrow"
7. Start Dragging the item to the document, and you can unhold the left mouse button.

Actual Results:
Steps A:
the first item "curved-right-arrow" is inserted.

Steps B:
"curved-left-arrow" is inserted. Works as Expected

Expected Results:
"curved-left-arrow" is inserted


Reproducible: Always


User Profile Reset: Yes



Additional Info:
https://opengrok.libreoffice.org/xref/core/svx/source/gallery2/galbrws2.cxx?r=b512ce25#336

https://opengrok.libreoffice.org/xref/core/svx/source/gallery2/galbrws2.cxx?r=b512ce25#369

inherits the ValueSet class
https://opengrok.libreoffice.org/xref/core/include/svx/galctrl.hxx?r=d26d1da8#89

the eventhandler is called on MouseButtonUp, not MouseButtonDown
https://opengrok.libreoffice.org/xref/core/svtools/source/control/valueset.cxx?r=d6c32cff#495
Comment 1 himajin100000 2020-06-11 10:59:43 UTC
Theoritically, this happens on every application that can use Gallery, so I wasn't sure what component to choose.
Comment 2 V Stuart Foote 2020-06-11 14:11:10 UTC
Confirmed. Mouse down appears to select a graphic, but the landing graphic for the category still has drag & drop focus.  The wrong graphic is dragged out of the gallery.

Version: 7.1.0.0.alpha0+ (x64)
Build ID: 59939d2490726336546c7ad05082d23031074e12
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 3 Caolán McNamara 2020-06-25 20:08:26 UTC

*** This bug has been marked as a duplicate of bug 134285 ***