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.