Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ui/js/widgets/class.widget.js')
-rw-r--r--ui/js/widgets/class.widget.js27
1 files changed, 26 insertions, 1 deletions
diff --git a/ui/js/widgets/class.widget.js b/ui/js/widgets/class.widget.js
index e366479402d..2b5456d2f41 100644
--- a/ui/js/widgets/class.widget.js
+++ b/ui/js/widgets/class.widget.js
@@ -122,6 +122,8 @@ class CWidget extends CBaseComponent {
this._update_retry_sec = 3;
this._show_preloader_asap = true;
this._resizable_handles = [];
+
+ this._hide_preloader_animation_frame = null;
}
// Logical state control methods.
@@ -816,15 +818,38 @@ class CWidget extends CBaseComponent {
}
_showPreloader() {
+ // Fixed Safari 16 bug: removing preloader classes on animation frame to ensure removal of icons.
+
+ if (this._hide_preloader_animation_frame !== null) {
+ cancelAnimationFrame(this._hide_preloader_animation_frame);
+ this._hide_preloader_animation_frame = null;
+ }
+
this._content_body.classList.add('is-loading');
this._content_body.classList.remove('is-loading-fadein', 'delayed-15s');
}
_hidePreloader() {
- this._content_body.classList.remove('is-loading', 'is-loading-fadein', 'delayed-15s');
+ // Fixed Safari 16 bug: removing preloader classes on animation frame to ensure removal of icons.
+
+ if (this._hide_preloader_animation_frame !== null) {
+ return;
+ }
+
+ this._hide_preloader_animation_frame = requestAnimationFrame(() => {
+ this._content_body.classList.remove('is-loading', 'is-loading-fadein', 'delayed-15s');
+ this._hide_preloader_animation_frame = null;
+ });
}
_schedulePreloader() {
+ // Fixed Safari 16 bug: removing preloader classes on animation frame to ensure removal of icons.
+
+ if (this._hide_preloader_animation_frame !== null) {
+ cancelAnimationFrame(this._hide_preloader_animation_frame);
+ this._hide_preloader_animation_frame = null;
+ }
+
this._content_body.classList.add('is-loading', 'is-loading-fadein', 'delayed-15s');
}