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-19 14:51:12 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-11-19 20:45:36 (GMT)
commit9ac0a9e44f2b866cc4ec9a2fbac7c09c77ecb2f4 (patch)
treece847ebab3099461f2ce6bf26debae15df6c37c2 /webactivity.py
parentbcec5caa2fa3bc430fc46568606a2692214c6628 (diff)
Hanlde focus properly on each tab SL #4200
The focus is grabbed after loading the 'Home page' and when the session is restored. This patch allow us to show the OSK when it's needed and to be able to start typing with the hardware keyboard. Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'webactivity.py')
-rw-r--r--webactivity.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/webactivity.py b/webactivity.py
index 6dbd222..780b87f 100644
--- a/webactivity.py
+++ b/webactivity.py
@@ -409,6 +409,7 @@ class WebActivity(activity.Activity):
for number, tab in enumerate(self.model.data['currents']):
tab_page = self._tabbed_view.get_nth_page(number)
tab_page.browser.set_history_index(tab['history_index'])
+ tab_page.browser.grab_focus()
self._tabbed_view.set_current_page(self.model.data['current_tab'])
elif self.metadata['mime_type'] == 'text/uri-list':
@@ -422,6 +423,7 @@ class WebActivity(activity.Activity):
else:
file_uri = 'file://' + file_path
self._tabbed_view.props.current_browser.load_uri(file_uri)
+ self._tabbed_view.props.current_browser.grab_focus()
def write_file(self, file_path):
if not self.metadata['mime_type']: