diff options
Diffstat (limited to 'webactivity.py')
-rw-r--r-- | webactivity.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/webactivity.py b/webactivity.py index 780b87f..0e3b61b 100644 --- a/webactivity.py +++ b/webactivity.py @@ -526,8 +526,12 @@ class WebActivity(activity.Activity): return True elif key_name == 'Escape': - _logger.debug('keyboard: Stop loading') - browser.stop_loading() + status = browser.get_load_status() + loading = WebKit.LoadStatus.PROVISIONAL <= status \ + < WebKit.LoadStatus.FINISHED + if loading: + _logger.debug('keyboard: Stop loading') + browser.stop_loading() return False |