From 6ad0c254b5d118741281230be3ed82d7706b02a6 Mon Sep 17 00:00:00 2001 From: Victor Cerutti Date: Tue, 6 Feb 2018 07:31:00 +0100 Subject: [PATCH] Fix resizeObserver loop #12192 (#867) When the slider width is updated, resizeObserver prevent for firing the function another time. Exemple: https://jsfiddle.net/ba1ad26e/11/ Compete doc: https://wicg.github.io/ResizeObserver/#html-event-loop Solution: Observe the width change of the card instead of the slider. If the state value is hidden/displayed, it won't change again the slider width and so it will prevent the msg in the log Drawback: the function cannot use the width sent by the resizeObserver anymore as it's no longer the slider width but the card width --- src/state-summary/state-card-input_number.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/state-summary/state-card-input_number.html b/src/state-summary/state-card-input_number.html index dbdcb8941f..23ee342992 100644 --- a/src/state-summary/state-card-input_number.html +++ b/src/state-summary/state-card-input_number.html @@ -38,7 +38,7 @@ } -
+