# Mac dropdown menu bug in 3.3.1?

**URL:** <https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776>\
**Category:** Technical Support & Bugs\
**Created:** [June 25, 2020, 1:25pm UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776 "2020-06-25T13:25:01Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [July 9, 2020, 6:27pm UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776/21 "2020-07-09T18:27:14Z")

</div>

Thus spake Cattlesquat:

> > When I CTRL+click on a marker to get the contextual menu for it the  
> > marker gets deselected. This seems to be why the menu item does not  
> > execute on the marker.
> 
> This is an example of why we have to check isPopupTrigger() when we’re  
> doing other things than just putting up context menus.

So… I suspect now that you’re right… but how did this ever work before  
3.3.0 in that case? I added the isPopupTrigger() checks in a commit on 19  
May of _this year_. There was no version of VASSAL prior to 3.3.0-beta4  
which had them.

–  
J.

---

<div class="post-metadata">

**Author:** ![Cattlesquat](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cattlesquat/32/241_2.png) [@Cattlesquat](https://forum.vassalengine.org/u/Cattlesquat)\
**Post date:** [July 9, 2020, 6:43pm UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776/22 "2020-07-09T18:43:41Z")

</div>

Before 3.3.0 we were using Java 8 and all its now-deprecated-ass stuff like isMetaDown() which acted as an ill-conceived but largely functional shortcut for detecting context menus and right-clickiness in one untidy package. It was when we went back to take out all the deprecated stuff that this was all introduced.

If you’re swamped I’m happy to go have a rip through this stuff and make an initial PR. Or happy to do a forensic review on one you do.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [July 9, 2020, 6:50pm UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776/23 "2020-07-09T18:50:07Z")

</div>

Thus spake Cattlesquat:

> If you’re swamped I’m happy to go have a rip through this stuff and make  
> an initial PR. Or happy to do a forensic review on one you do.

I’ll have something for you to look at later this evening. Almost all  
the mouse handlers we have aren’t for the map and do just one thing,  
so I should be able to rip through those fairly quickly.

–  
J.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [July 9, 2020, 7:20pm UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776/24 "2020-07-09T19:20:39Z")

</div>

I’ve checked through all the uses of MouseEvent we have. A number of classes I was able to exclude immediately because they have mouse listeners which only show a context menu or do nothing at all. Here’s a list of the remaining classes which deal with MouseEvents:

AboutWindow  
ActionButton  
ChooseComponentDialog  
ConfigureTree  
DragBuffer  
ExtensionTree  
FreeRoator  
GlobalMap  
GridEditor  
ImagePicker  
KeyBufferer  
LOS\_Thread  
Map  
MapCenterer  
ModuleManagerWindow  
MultiRoll  
PieceDefiner  
PieceMover  
PieceSlot  
PolygonEditor  
PropertySheet  
RegionGrid  
RoomInteractionControlsInitializer  
ServerAddressBook  
SplashScreen  
StackExpander  
TranslateWindow

Some of these might be fine as-is, but I couldn’t tell from 15 seconds of looking. Some definitely need adjustment.

---

<div class="post-metadata">

**Author:** ![Cattlesquat](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cattlesquat/32/241_2.png) [@Cattlesquat](https://forum.vassalengine.org/u/Cattlesquat)\
**Post date:** [July 9, 2020, 7:23pm UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776/25 "2020-07-09T19:23:17Z")

</div>

PieceMover, KeyBufferer (and I guess Map) will be the most important/delicate/complex/godawful, and will eliminate 98% of the bugs.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [July 10, 2020, 12:47am UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776/26 "2020-07-10T00:47:19Z")

</div>

See PR 79: [github.com/vassalengine/vassal/pull/79](https://github.com/vassalengine/vassal/pull/79)

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [July 13, 2020, 8:54pm UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776/27 "2020-07-13T20:54:57Z")

</div>

If you’re having this problem, please try this build and let us know if it restores the behavior from 3.2.17 for you:

[vassalengine.org/~uckelman/t … macosx.dmg](http://www.vassalengine.org/~uckelman/tmp/VASSAL-3.3.1-313-g9ea7249f-macosx.dmg)

---

<div class="post-metadata">

**Author:** ![marktb1961](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/marktb1961/32/231_2.png) [@marktb1961](https://forum.vassalengine.org/u/marktb1961)\
**Post date:** [July 14, 2020, 3:34pm UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776/28 "2020-07-14T15:34:24Z")

</div>

Yes, this seems to fix the Ctrl/Click issue.

i.e. Pressing Control-Click gives me the same result as two-finger press on the trackpad; i.e. “right-click” behaviour - piece is selected and dropdown menu appears. When chosen, a menu option effects the clicked-on piece.

Perhaps coincidence (different build?) but a separate issue that I reported on 3.3.1 development variants does not replicate in -313. I will update my posting about that.

---

<div class="post-metadata">

**Author:** ![marktb1961](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/marktb1961/32/231_2.png) [@marktb1961](https://forum.vassalengine.org/u/marktb1961)\
**Post date:** [July 14, 2020, 3:55pm UTC](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776/29 "2020-07-14T15:55:10Z")

</div>

“Perhaps coincidence (different build?) but a separate issue that I reported on 3.3.1 development variants does not replicate in -313. I will update my posting about that.”

Sorry, I spoke too soon. Specifically testing, I soon found that this seperate issue does in fact persist (nothing to do with dropdown menu bug). I updated the bug retracker record accordingly.

[Previous page](https://forum.vassalengine.org/t/mac-dropdown-menu-bug-in-3-3-1/10776.md?page=1)
