Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webactivity.py
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2012-11-21 16:23:27 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2012-11-22 21:37:33 (GMT)
commit843faffb867fb5212a2d0ce769083989d66d66b2 (patch)
treeba5f3bc640b4ad1bd4946b99689fbb56bf6c89bf /webactivity.py
parent0f656938d30f6697095d940618f77173d8f9cb33 (diff)
Avoid close the PDFTab when Esc is pressed SL #4246
Do not call "stop_loading" if the WebKit is not in 'loading' state when 'Esc' is pressed. Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Acked-by: Manuel Quiñones <manuq@laptop.org>
Diffstat (limited to 'webactivity.py')
-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