From 8575d72f6e188e0ee3dbd27d643e8312a6f732ed Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Fri, 22 Dec 2023 23:36:46 -0600 Subject: [PATCH] add e.target check to prevent dismissal of select menu --- client/homebrew/editor/snippetbar/snippetbar.jsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index d4de1d2f5..ddcb02f7c 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -74,6 +74,7 @@ const Snippetbar = createClass({ } }, + mergeCustomizer : function(valueA, valueB, key) { if(key == 'snippets') { const result = _.reverse(_.unionBy(_.reverse(valueB), _.reverse(valueA), 'name')); // Join snippets together, with preference for the current theme over the base theme @@ -102,10 +103,12 @@ const Snippetbar = createClass({ this.props.onInject(injectedText); }, - toggleThemeSelector : function(){ - this.setState({ - themeSelector : !this.state.themeSelector - }); + toggleThemeSelector : function(e){ + if(e.target.tagName != 'SELECT'){ + this.setState({ + themeSelector : !this.state.themeSelector + }); + } }, changeTheme : function(e){ @@ -119,7 +122,7 @@ const Snippetbar = createClass({ renderThemeSelector : function(){ return
- {EditorThemes.map((theme, key)=>{ return ; })}