Commit 759120b9 authored by Marco Trevisan's avatar Marco Trevisan 🎺

popupMenu: Connect after to item 'activate' signal

A menu item activation might lead to a call to `itemActivated` which eventually
will close the menu which leads to a `PopupMenu.removeAll` that destroys all the
items, stopping the emission of the 'activate' signal for them.

Before commit 4258ae3e this was not happening because destroy'ing a javascript
object wasn't really disposing it and thus stopping the signal emissions.

So, ensure that `itemActivated` is called after that all the other callbacks
have been consumed, and so that the menu is closed as last thing.

Fixes #1326

parent de0e2161
......@@ -572,7 +572,7 @@ var PopupMenuBase = class {;
menuItem._activateId = menuItem.connect('activate', (menuItem, event) => {
menuItem._activateId = menuItem.connect_after('activate', (menuItem, event) => {
this.emit('activate', menuItem);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment