diff --git a/sources/services/gallery/searchSuggest.js b/sources/services/gallery/searchSuggest.js index 26c7192..47847f5 100644 --- a/sources/services/gallery/searchSuggest.js +++ b/sources/services/gallery/searchSuggest.js @@ -48,7 +48,7 @@ function attachEvents(searchSuggest, searchInput, toggleButton) { const controlValue = control.getValue(); control.setValue(!controlValue); } - if (!event.ctrlKey) { + if (!event.metaKey && !event.ctrlKey) { suggestList.hide(); } }); diff --git a/sources/utils/util.js b/sources/utils/util.js index 9c1ea5d..34e31c8 100644 --- a/sources/utils/util.js +++ b/sources/utils/util.js @@ -551,6 +551,11 @@ function isSafari() { return navigator.userAgent.indexOf("Safari") > -1; } +function isMacintosh() { + debugger; + return navigator.userAgent.indexOf("Macintosh") > -1; +} + export default { openInNewTab, openImageInNewTab, @@ -592,6 +597,7 @@ export default { shareFile, isPortrait, getFilterLabelId, - isSafari + isSafari, + isMacintosh, }; diff --git a/sources/views/subviews/gallery/parts/searchSuggest.js b/sources/views/subviews/gallery/parts/searchSuggest.js index 47cc8d2..b091cb9 100644 --- a/sources/views/subviews/gallery/parts/searchSuggest.js +++ b/sources/views/subviews/gallery/parts/searchSuggest.js @@ -1,3 +1,5 @@ +import util from "../../../../utils/util"; + function getView() { /** @type {webix.ui.suggestConfig} */ const view = { @@ -9,7 +11,9 @@ function getView() { multiselect: true, tooltip: { view: "tooltip", - template: "Press and hold the left CTRL key to make multiple selections", + template: util.isMacintosh() + ? "Press and hold Cmd (⌘) key to make multiple selections" + : "Press and hold left CTRL key to make multiple selections", } }, };