From 07fe7a1107e6a0cc2537b444f2965e80873133d6 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 25 Feb 2019 10:42:10 -0500 Subject: [PATCH] Fix an issue where pressing enter in the preset search bar wouldn't select the first preset (close #5921) --- modules/ui/preset_list.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/preset_list.js b/modules/ui/preset_list.js index 0f5e43ffe..51c9f3a09 100644 --- a/modules/ui/preset_list.js +++ b/modules/ui/preset_list.js @@ -90,7 +90,8 @@ export function uiPresetList(context) { // enter var value = search.property('value'); if (d3_event.keyCode === 13 && value.length) { - list.selectAll('.preset-list-item:first-child').datum().choose(); + list.selectAll('.preset-list-item:first-child') + .each(function(d) { d.choose.call(d3_select(this).node()); }); } }