From 7abfe41ab792e93b94e186f9ece4a5fd3b58a3e4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 24 Apr 2016 05:12:38 -0400 Subject: [PATCH] Fix bug where getting HTML editor content could steal focus from other form controls (#5223) --- program/js/treelist.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/program/js/treelist.js b/program/js/treelist.js index 9194d7b..bcbfeeb 100644 --- a/program/js/treelist.js +++ b/program/js/treelist.js @@ -943,7 +943,7 @@ for (var id in indexbyid) { li = id2dom(id); item = li.children().first().get(0); - if (height = item.offsetHeight) { + if (item && (height = item.offsetHeight)) { pos = $(item).offset(); pos.top += list_scroll_top; item_coords[id] = { -- Gitblit v1.9.1