From 605e44952e384971ba435137004bae56a83aa624 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 13 Aug 2013 17:34:10 -0700 Subject: [PATCH] Prevent loss of focus when clicking on combobox menu Fixes #963 --- js/lib/d3.combobox.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/lib/d3.combobox.js b/js/lib/d3.combobox.js index 7d35d9434..98cc2949c 100644 --- a/js/lib/d3.combobox.js +++ b/js/lib/d3.combobox.js @@ -65,6 +65,10 @@ d3.combobox = function() { position: 'absolute', display: 'block', left: '0px' + }) + .on('mousedown', function () { + // prevent moving focus out of the text field + d3.event.preventDefault(); }); d3.select(document.body)