Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webactivity.py8
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