From 9429005c02f376fc6f9738e2c6cf1477e372c41d Mon Sep 17 00:00:00 2001 From: rebecca0201 Date: Thu, 7 Sep 2023 12:40:09 +0800 Subject: [PATCH] ZK-5354: Update animation implementation to avoid iframe reloading --- zk/src/main/resources/web/js/zk/anima.ts | 5 +++ zkdoc/release-note | 1 + .../zkoss/zktest/test2/F100_ZK_5354VM.java | 27 +++++++++++ .../src/main/webapp/test2/F100-ZK-5354-1.zul | 18 ++++++++ .../src/main/webapp/test2/F100-ZK-5354-2.zul | 39 ++++++++++++++++ zktest/src/main/webapp/test2/F100-ZK-5354.zul | 28 ++++++++++++ .../src/main/webapp/test2/config.properties | 2 + .../zktest/zats/test2/F100_ZK_5354Test.java | 45 +++++++++++++++++++ 8 files changed, 165 insertions(+) create mode 100644 zktest/src/main/java/org/zkoss/zktest/test2/F100_ZK_5354VM.java create mode 100644 zktest/src/main/webapp/test2/F100-ZK-5354-1.zul create mode 100644 zktest/src/main/webapp/test2/F100-ZK-5354-2.zul create mode 100644 zktest/src/main/webapp/test2/F100-ZK-5354.zul create mode 100644 zktest/src/test/java/org/zkoss/zktest/zats/test2/F100_ZK_5354Test.java diff --git a/zk/src/main/resources/web/js/zk/anima.ts b/zk/src/main/resources/web/js/zk/anima.ts index e7baf630174..0829dfab364 100644 --- a/zk/src/main/resources/web/js/zk/anima.ts +++ b/zk/src/main/resources/web/js/zk/anima.ts @@ -432,6 +432,11 @@ export namespace anima_global { // The methods are borrowed from jquery-ui ui/effect.js, MIT license. /** @internal */ _createWrapper(element: JQuery): JQuery { + // ZK-5354: Update animation implementation to avoid iframe reloading + if (element.find('iframe').length) { + return element; + } + // If the element is already wrapped, return it var wrapped = element.children('.ui-effects-wrapper'); if (wrapped.length) { diff --git a/zkdoc/release-note b/zkdoc/release-note index 28f8fe2cf93..b2ec8922c24 100644 --- a/zkdoc/release-note +++ b/zkdoc/release-note @@ -24,6 +24,7 @@ ZK 10.0.0 ZK-4928: expose widget private functions and variables as public ones ZK-5119: Integrate Font Awesome 6 free icons ZK-5541: Move widget restriction check to Client MVVM + ZK-5354: Update animation implementation to avoid iframe reloading * Bugs ZK-5089: AfterSizeEvent doesn't return a correct size of a Window component diff --git a/zktest/src/main/java/org/zkoss/zktest/test2/F100_ZK_5354VM.java b/zktest/src/main/java/org/zkoss/zktest/test2/F100_ZK_5354VM.java new file mode 100644 index 00000000000..0360a11c62d --- /dev/null +++ b/zktest/src/main/java/org/zkoss/zktest/test2/F100_ZK_5354VM.java @@ -0,0 +1,27 @@ +/* F100_ZK_5354VM.java + + Purpose: + + Description: + + History: + Wed Sep 06 15:27:17 CST 2023, Created by rebeccalai + +Copyright (C) 2023 Potix Corporation. All Rights Reserved. +*/ +package org.zkoss.zktest.test2; + +import org.zkoss.bind.annotation.Init; + +public class F100_ZK_5354VM { + private static int initCount = 0; + + public int getInitCount() { + return initCount; + } + + @Init + public void init() { + initCount++; + } +} diff --git a/zktest/src/main/webapp/test2/F100-ZK-5354-1.zul b/zktest/src/main/webapp/test2/F100-ZK-5354-1.zul new file mode 100644 index 00000000000..b2e47d46b10 --- /dev/null +++ b/zktest/src/main/webapp/test2/F100-ZK-5354-1.zul @@ -0,0 +1,18 @@ + + + +
+ initCount =
+
\ No newline at end of file diff --git a/zktest/src/main/webapp/test2/F100-ZK-5354-2.zul b/zktest/src/main/webapp/test2/F100-ZK-5354-2.zul new file mode 100644 index 00000000000..b07c3075232 --- /dev/null +++ b/zktest/src/main/webapp/test2/F100-ZK-5354-2.zul @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zktest/src/main/webapp/test2/F100-ZK-5354.zul b/zktest/src/main/webapp/test2/F100-ZK-5354.zul new file mode 100644 index 00000000000..24dad478394 --- /dev/null +++ b/zktest/src/main/webapp/test2/F100-ZK-5354.zul @@ -0,0 +1,28 @@ + + + + + +
+ center +
+ +