From 14693832b2bc156a7ae5dc8f1da4e2b2b3968c13 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 12 Aug 2015 07:53:23 -0400
Subject: [PATCH] Fix so input field (e.g. search box) does not loose focus on list load (#1490455)
---
CHANGELOG | 1 +
program/js/app.js | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index d3753d8..beea3a0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -27,6 +27,7 @@
- Fix removing signature when switching to identity with an empty sig in HTML mode (#1490470)
- Disable links list generation on html-to-text conversion of identities or composed message (#1490437)
- Fix "washing" of style elements wrapped into many lines
+- Fix so input field (e.g. search box) does not loose focus on list load (#1490455)
RELEASE 1.1.2
-------------
diff --git a/program/js/app.js b/program/js/app.js
index 3884e9a..d82d8c6 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -7524,7 +7524,7 @@
}
this.enable_command('set-listmode', this.env.threads && !is_multifolder);
- if (list.rowcount > 0)
+ if (list.rowcount > 0 && !$(document.activeElement).is('input,textarea'))
list.focus();
this.msglist_select(list);
}
@@ -7540,7 +7540,7 @@
this.enable_command('search-create', this.env.source == '');
this.enable_command('search-delete', this.env.search_id);
this.update_group_commands();
- if (this.contact_list.rowcount > 0)
+ if (this.contact_list.rowcount > 0 && !$(document.activeElement).is('input,textarea'))
this.contact_list.focus();
this.triggerEvent('listupdate', { folder:this.env.source, rowcount:this.contact_list.rowcount });
}
--
Gitblit v1.9.1