broulik created this revision.
broulik added reviewers: Plasma, fvogt.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
broulik requested review of this revision.

REVISION SUMMARY
  `aboutToHide` is emitted before an action is triggered and `activeAction()` 
is the action currently hovered.
  This means we can't properly tell that the prompt got canceled, when hovering 
an action and then hitting Escape to close the menu.
  This patch sets a property in response to `triggered` and then does a delayed 
check for that in `aboutToHide`.

TEST PLAN
  Used https://alligator.io/js/web-share-api/ for testing
  
  - Clicked "Share me!" button, got purpose prompt, clicked Email, shared 
correctly
  - Clicked "Share me!" button, got purpose prompt, clicked outside, canceled 
correctly
  
  With this patch
  
  - Clicked "Share me!" button, hovered an action, then hit Escape to cancel 
it. Now cancels properly.
  
  Previously it would effectively break the plugin as it would never reset its 
pending reply state.

REPOSITORY
  R856 Plasma Browser Integration

REVISION DETAIL
  https://phabricator.kde.org/D28719

AFFECTED FILES
  host/purposeplugin.cpp

To: broulik, #plasma, fvogt
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart

Reply via email to