Version: (using KDE KDE 3.2.2) Installed from: Mandrake RPMs OS: Linux When you come onto pages: www.dabster.pl www.samar.pl javascript menu doesn't work. There's no problem with other tested browsers: Mozilla, IE, Galeon, Epiphany, Opera... Isn't this strange? Konqueror doesn't event correctly handle CSS standards.
The first one (www.dabster.pl) seems to work if you set the User Agent to Internet Explorer. The second one seems a little broken still though.
#2 needs window.getComputedStyle. The standard way would be defaultView.getComputedStyle
#2 is now fixed... sorta, it crashes some of the time! #1 needs window.getSelection..
www.dabster.pl doesnt work as expected in normal mode (konq 3.5.4), firefox is rendering it nicely. i see no problems with www.samar.pl. -> confirm
Dapster.pl works if using IE6 user agent. http://www.dabster.pl/domMenu.js claims to support konqueror too, but code is propably too old for konqueror 3.5 http://freshmeat.net/projects/dommenu/?topic_id=92 http://mojavelinux.com/cooker/demos/domMenu/Changelog.html
confirming the dabster.pl part of the report
The problem here is that the script detects us as -both- konqueror and mozilla, and uses the non-standard Mozilla extension window.getSelection() because of that.
can konqueror handle this differently or is it the sites (script) fault?
Well, we could implement (or at least stub) the extension. Or we could try not to have "gecko" in the user agent string, but that would break a whole bunch of other websites. Here is the code it runs the first thing when handling hover: if (domMenu_isGecko) { window.getSelection().removeAllRanges(); } The domMenu_isGecko is set because we have the string "like gecko" in our user agent string.. Then of course window.getSelection returns Undefined, since we don't support this extension, and boom, no menu. If I set the flag to 0 it works, of course. if the website was changed to do feature sniffing here it would work regardless of UA-string, of course..
The latest version of the menu script actually "fixes" it by checking for Mozilla slightly differently: // safari and konq may use string "khtml, like gecko", so check for destinctive / var domLib_isGecko = domLib_userAgent.indexOf('gecko/') != -1; vs: var domMenu_isGecko = domMenu_userAgent.indexOf('gecko') != -1 ? 1 : 0;
Maksim, in that case i will call it fixed then because: a) the problem does no longer occur AND b) it was the website-script's fault does that sound sane?
No. The website still doesn't work, so what's fixed about it?
k. quoting comment no 10: "The latest version of the menu script actually "fixes" it by checking for Mozilla slightly differently:" sounded like the script has been updated and fixes the problem. i might add that i do not understand the code snippets, in case they obviously tell a different story and make me now look plain stupid now. ^_^
*** This bug has been marked as a duplicate of bug 174637 ***