| 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.
| |
| 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[3]: Opera and the Back button ¶ | |
| 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. Hmm, that doesn't make any sense to me either. The menu script doesn't “end”. It installs some hooks (some event handlers) that get called when you mouseover or click the menu items, or even press keyboard combinations (but that doesn't work in Opera either because Opera has a million shortcuts, which can't be overwritten from JS). After deciphering the error messages, I am sure that the problem appears because Opera only saves “known” attributes of DOM nodes, such as class, id, etc. But DynarchMenu uses some custom attributes in order to link DOM nodes to JavaScript objects, and those attributes become “undefined” when you click “back”, which renders the menu unusable. While you're at it, you might also want to tell them that there's yet another “optimization” which is not nice: Opera doesn't load images unless they are visible. But for instance, there's a common technique to preload images in an invisible DIV--Opera will request those only when they become visible, which is why icons get loaded after submenus popped up. I know they say it's the fastest browser on Earth, but they should make some “compromises” too... | |
| 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 |
| Re[2]: Opera and the Back button ¶ | |
| An Opera tech. person followed up with me on this issue and it appears that the best solution is to only execute that code for Internet Explorer--which is actually the only browser affected by memory leaks. A new release having this fix (and others) will be up in a few days. In any case, it looks like this Opera feature is indeed implemented properly--it was our code that cleaned up, not Opera! :-) Sorry I have jumped to conclusions too fast. | |
| last |














