From c360e178c4ab597de4b8d071f173a9ff3864f052 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Wed, 12 Aug 2015 07:52:12 -0400 Subject: [PATCH] Fix so input field (e.g. search box) does not loose focus on list load (#1490455) --- program/js/app.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index f0e9149..212dd86 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -7612,7 +7612,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); } @@ -7628,7 +7628,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