What Could Cause a Web Page Resize Event to NOT Fire?

I’m seeing an issue in my web app where the resize event of the web page is not firing when I resize the browser.

Anyone have an idea what would interrupt that?

Actually, looks like it’s something to do with RubberViewsWE…

RuberViewsWE actually needs Resized to work, since otherwise SizAll would not run.

I just checked quickly in the demo project on Mac, code executes normally before and after SizAll.

Which platform ? Which version of Xojo ? Would you be using the Elastic Window drop-in replacement ?

It’s an issue with LiveResize.

It works when the webpage first opens, but something in the JavaScript after LiveResize fires hoses all further resize events…

[quote=208214:@Jon Ogden]It’s an issue with LiveResize.

It works when the webpage first opens, but something in the JavaScript after LiveResize fires hoses all further resize events…[/quote]

I do not see that here. Could you send me a sample project by email ?

It doesn’t happen all the time and I can’t easily replicate it. But I definitely see it happening. I need to trace down exactly where/how it happens…

As soon as you get anything reproducible, I will be very interested.

I will. You know me. I’ll be in touch…

I know :wink:

OK. The last four lines in LiveResizeInit are:

  exe = exe + "var uneDate = new Date(); this.tictac = uneDate.getTime(); "
  exe = exe + "debugger; "
  exe = exe+"}"
  WPage.ExecuteJavaScript(exe)

If I comment out those lines, then my resize events fire and all is happy. If these lines are uncommented, then after the first resize event, resize ever fires after that.

The first line actually sets the timer that will raise the Resized event when resizing is over.

If you comment out the last line, LiveResize will not execute. So it is as if you had turned LiveResize off.

What I really need is a reliable way of triggering the issue you describe,so I can investigate.

Yeah, I hear you. I’ve got multiple, layered container controls and something is getting mucked up along the way…

Try to switch off live resize in containers, and keep it only in the WebPage. The way it is set, as soon as the resize ends, Resized is raised. But if you have several layers of containers and liveResize used into each, they may start competing for the event.

I’ll check. I don’t think I use liveresize on the other containers becuase I do much of my own already.

The only thing that could prevent the Resized event in a web page would be if another JavaScript was using the OnResize event. Then it could snatch it away from both RubberViewsWE and Xojo.