diff --git a/applets/notifications/package/contents/ui/NotificationItem.qml b/applets/notifications/package/contents/ui/NotificationItem.qml --- a/applets/notifications/package/contents/ui/NotificationItem.qml +++ b/applets/notifications/package/contents/ui/NotificationItem.qml @@ -51,6 +51,21 @@ property ListModel actions: ListModel { } + function pressedAction() { + for (var i = 0, count = actionRepeater.count; i < count; ++i) { + var item = actionRepeater.itemAt(i) + if (item.pressed) { + return item + } + } + + if (settingsButton.pressed) { + return settingsButton + } + + return null + } + function updateTimeLabel() { if (!created || created.getTime() <= 0) { timeLabel.text = "" diff --git a/applets/notifications/package/contents/ui/NotificationPopup.qml b/applets/notifications/package/contents/ui/NotificationPopup.qml --- a/applets/notifications/package/contents/ui/NotificationPopup.qml +++ b/applets/notifications/package/contents/ui/NotificationPopup.qml @@ -78,6 +78,12 @@ hoverEnabled: true onClicked: { + // the MEL would close the notification before the action button + // onClicked handler would fire effectively breaking notification actions + if (notificationItem.pressedAction()) { + return + } + closeNotification(notificationProperties.source) notificationPopup.hide() }