From 706bac30ae5eeb10ae4aa2e675ebd75c4d9ba3a7 Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Thu, 4 Apr 2024 00:52:55 +0200 Subject: [PATCH] vmui: fix step update on input blur in Firefox/Safari (#6034) * vmui: fix step value application on input blur * Update docs/CHANGELOG.md --------- Co-authored-by: Aliaksandr Valialkin --- .../Configurators/StepConfigurator/StepConfigurator.tsx | 7 ++++++- docs/CHANGELOG.md | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/vmui/packages/vmui/src/components/Configurators/StepConfigurator/StepConfigurator.tsx b/app/vmui/packages/vmui/src/components/Configurators/StepConfigurator/StepConfigurator.tsx index f05d78fbd..348de40db 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/StepConfigurator/StepConfigurator.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/StepConfigurator/StepConfigurator.tsx @@ -35,7 +35,7 @@ const StepConfigurator: FC = () => { const { value: openOptions, toggle: toggleOpenOptions, - setFalse: handleCloseOptions, + setFalse: setCloseOptions, } = useBoolean(false); const buttonRef = useRef(null); @@ -49,6 +49,11 @@ const StepConfigurator: FC = () => { setError(""); }; + const handleCloseOptions = () => { + handleApply(); + setCloseOptions(); + }; + const handleFocus = () => { if (document.activeElement instanceof HTMLInputElement) { document.activeElement.select(); diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 0d0cadbee..177c7bb44 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -72,6 +72,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): return proper responses for [AWS Firehose](https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html#requestformat) requests according to [these docs](https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html#responseformat). See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6016) and [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6037). * BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl.html): properly parse TLS key and CA files for [InfluxDB](https://docs.victoriametrics.com/vmctl/#migrating-data-from-influxdb-1x) and [OpenTSDB](https://docs.victoriametrics.com/vmctl/#migrating-data-from-opentsdb) migration modes. * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix VictoriaLogs UI query handling to correctly apply `_time` filter across all queries. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5920). +* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix issue where `step` parameter wasn't updated after moving the focus outside the `step` input field in Firefox. * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix freezing when pasting a query with autocomplete enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5923). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix auto-suggestion trigger issue after whitespace char. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5866). * BUGFIX: [vmselect](https://docs.victoriametrics.com/): make vmselect resilient to absence of cache folder. If cache folder was mistakenly deleted by user or OS, vmselect will try re-creating it first. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5985).