| Opera and the Back button ¶ | |
| I'm trying to get the menus to work in Opera 8. So far I have run into a couple of issues. http://www.dynarch.com/demos/hmenu/examples/actions.html I suspect this is some problem with Opera not correctly remembering the state of the javascript engine when you go back. I have logged this as a bug with opera as well and will update this thread if they give me an answer. Opera seems to do things a little differently in that they supposedly remember the state of the DOM and javascript engine for each page so that when you go back everything should be as it was. One issue with this is that the document is not "reloaded" so the onLoad event is not triggered. I'm just posting this here in case anyone has a workaround for this already. Cheers | |
| Re: Opera and the Back button ¶ | |
| 1. Opera's right click context menu can't be prevented. I'ved lodged this with opera as a bug and they have said that it will be fixed (it's broken in 8 but works ok in 7) Well, that's clearly a bug in O8. 2. If you load a page with a menu, then move to another page, then hit the back button the menu no longer works. [...] That's an interesting feature, but I doubt they can do it well. If onload isn't called, then the menu doesn't appear--so unless the browser fully remembers all the DOM nodes and their data (because we're storing important bits of data in the DOM nodes themselves) then this “feature” will break the menu, and most probably a lot of other scripts too... Sorry to hear these bad news about Opera. We don't know of any workaround at this time.
| |
| last |
| Re[2]: Opera and the Back button ¶ | |
| I've had a response from Opera. This is what I told them to do to replicate the problem.
And this was their response...
I'm not sure I really understand what they mean and I'm hoping it might make more sense to you so that you might be able to suggest a work around or give me some more ammunition to fire back at Opera support. Thanks | |
| last |
| Re: Opera and the Back button ¶ | |
| OK, I finally nagged the people at Opera enough for them to take a good look and see what was going wrong. It's actually fairly obvious in hindsight. Inside the DynarchMenu.addInfo function you set up an event handler for the window.unload event to call DynarchMenu._cleanUp. This is the problem as it seems to remove the info structure needed by the menus. I tried removing the event setup call and I can now use the back button in Opera !! YAY ! The question then is, is it simply just a matter of removing that event or will that cause some other unforseen oddness elsewhere and will the removal cause problems for other browsers. Cheers, | |
| last |














