0

Problem with ZK application in iframe and browser back button

asked 2019-05-08 13:41:43 +0800

andij62 gravatar image andij62
315 1 7

updated 2019-05-08 13:43:30 +0800

My ZK program is built in as an iframe on a foreign site. If another page is called and then the browser back button jumps back to the page containing the iframe zk loses the click event on the button. The problem occurs with the Safari browser and I think that has to do with the bfcache safari uses. Does anyone have an idea what i can do here?

Best Regards

delete flag offensive retag edit

Comments

No one has an idea how to solve it?

andij62 ( 2019-05-10 16:55:41 +0800 )edit

I guess your description was not very clear I asked some questions for you to clarify... maybe you can add some screenshots or a like to a screen recording.

cor3000 ( 2019-05-14 14:29:22 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-05-17 16:47:33 +0800

cor3000 gravatar image cor3000
6280 2 7

I found this stackoverflow Q&A, regarding the same issue, tried it and luckily it worked on a mac.

I simply added the reloading script to the iframe page:

http://zkfiddle.org/sample/1s629bc/1-iframe-reload-on-browser-back#source-3

direct link: http://temp.zkfiddle.org:8080/t861icbc/1s629bc/1/

You see the cached iframe content flickering for a fraction of a second. So it doesn't really stop the bfcache, but it reloads on demand.

link publish delete flag offensive edit

Comments

Thank you for your help. That solves the problem!

andij62 ( 2019-05-17 23:26:25 +0800 )edit

thanks for getting back!

cor3000 ( 2019-05-20 10:03:25 +0800 )edit
0

answered 2019-05-14 14:23:30 +0800

cor3000 gravatar image cor3000
6280 2 7

If another page is called and then the browser back button jumps back to the page containing the iframe zk loses the click event on the button.

Your description is not entirely clear, can you please provide the exact sequence of user interactions leading to your problem.

So far I got (1 and 2), the rest is quite unclear

  1. html page with embedded iframe the
  2. iframe is displaying a zul page
  3. ??? how/where is another page called ???
  4. ??? how does the browser back button "jump" ???
  5. ??? zk loses the event on which button? where is the button ???
link publish delete flag offensive edit

Comments

Link from iframe (zul page) changes the url in the parent html page. Another html page is shown. The back-button returns to the html page with embedded iframe. The zk-button in the iframe loses the click event. The Problem is only in Safari.

andij62 ( 2019-05-16 02:10:04 +0800 )edit

thanks that clarifies the page flow, based on that it should be possible to reproduce the problem and perform some tests

cor3000 ( 2019-05-16 14:13:03 +0800 )edit

which may also be important... i use zk 8.5.0 CE with MVC-Pattern. The event is intercepted in the controller and it does not work there

andij62 ( 2019-05-17 16:09:47 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2019-05-08 13:41:43 +0800

Seen: 21 times

Last updated: May 17 '19

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More