Opera Web Browser Problem

classic Classic list List threaded Threaded
28 messages Options
12
XP1
Reply | Threaded
Open this post in threaded view
|

Re: Opera Web Browser Problem

XP1
This post was updated on .
Hugo <Nabble> wrote
So we think it is not worth adding extra code just to turnaround the bugs from Opera.
How do you know it is an Opera bug? Are you just assuming it is? Assuming that it is Opera's fault is wrong because most of the time, it is the web developer's fault.

This is true in this case because, as it turns out, Nabble's evil browser sniffing is causing this bug -- only in Opera because Nabble checks "if ($.browser.opera)".

Extra code is not the answer. Negative lines of code is the answer. Remove the evil browser sniffing.

Here is the forum thread about Nabble in the My Opera forums:
http://my.opera.com/community/forums/topic.dml?id=1067742

Yesterday, I was wrong to ignore "Javascript.jtp". There is another "Nabble.resizeFrames()" function in there. ಠ_ಠ

Nabble.resizeFrames = function(h, scroll) {
        if (Nabble.getParent().nabbleresize) {
                var height = h && typeof h == 'number'? h : Math.max(Nabble.getMyHeight() + 25, 600);
                var validHeight = Nabble.isValidHeight(height);
                height = validHeight? height : Nabble.heightLimit;
                var js = [], key = [];
                if (scroll) {
                        js.push("Nabble.scroll(" + scroll + ");");
                        key.push("scrolljs");
                }
                if (height != $(window).height()) {
                        js.push("Nabble.resizeFrames(" + height + "," + Nabble.quote(document.title) + "," + validHeight + ");");
                        key.push("resizejs");
                }
                if (js.length > 0)
                        Nabble.evalInTop(key, js);
        }
};
http://nabble.documentfoundation.org/Javascript.jtp?v=19
http://npopuk-forum.986084.n3.nabble.com/Javascript.jtp?v=19

"Nabble.resizeFrames()" calls "Nabble.getMyHeight()".
Nabble.getMyHeight = function() {
        try {
                if ($.browser.msie) return document.body.scrollHeight;
                if ($.browser.mozilla) return document.body.offsetHeight;
                else if ($.browser.opera) return document.documentElement.clientHeight;
                else if ($.browser.safari) return $('#nabble').height();
                else return Math.max(document.body.scrollHeight, document.body.offsetHeight);
        } catch(err) {}
        return 500;
};
Browser sniffing code gone wrong!

Every time the frame is resized, the window height changes, so "(height != $(window).height())" will always be true.
"Nabble.resizeFrames()" will call itself recursively, nonstop.

I have created a User JS for Opera that will remove Nabble's evil browser sniffing.

Fix Nabble: Fix Nabble's frame reloading bug by removing evil browser sniffing for Opera.
https://gist.github.com/1129867/

C'mon, Nabble! How many times do I have to say that evil browser sniffing is evil?

ClaudeMobetta wrote
As a web designer - I have found over the years that the ONLY browser that reads 100% of HTML code - as written - is Internet Explorer. Opera Chrome Firefox Safari Mozella etc - I have used them all and then some - DO NOT read the code 100% as written. There is always a glitch.
That is ridiculous. How can you conclude that because your code runs perfectly in Internet Explorer, it is the only browser that can read 100% of the code? What if your code is wrong? You are praising Internet Explorer without doubt for 100% of its perfect rendering -- such a ludicrous claim!

Anyway, in this case, Opera is trying to run the code that you give it -- "100% as written".

Bad code goes in; bad results come out.
XP1
Reply | Threaded
Open this post in threaded view
|

Re: Opera Web Browser Problem

XP1
In reply to this post by arrow
arrow wrote
Perhaps if Opera users complained to the makers of the browser they would fix it so that Nabble apps would work properly.
No need. I'm on this like a private investigator.
Reply | Threaded
Open this post in threaded view
|

Re: Opera Web Browser Problem

ClaudeMobetta
In reply to this post by XP1
Well fer one thing - and I have many reason to prefer IE...
I don’t want to use Firefox to read my own HTML code -
As it won’t play sound without I load the Huge - overpowering QuickTime..
Which always tries to be the default player...
Mobetta to keep it simple... 2 each ther own..

Claude
XP1
Reply | Threaded
Open this post in threaded view
|

Re: Opera Web Browser Problem

XP1
ClaudeMobetta wrote
As it won’t play sound without I load the Huge - overpowering QuickTime..
Which always tries to be the default player...
That is neither a problem with Firefox nor a problem with web development.

Check your program associations settings in Firefox and in your operating system.
Reply | Threaded
Open this post in threaded view
|

Re: Opera Web Browser Problem

miketaylr
In reply to this post by Hugo <Nabble>
Hi Hugo,

I work for Opera, and yes I use Opera. :)

The fix to this bug is very simple--and in fact requires you to remove code, rather than add it. You just have to remove the browser sniffing from Nabble.getMyHeight() (at http://nabble.documentfoundation.org/Javascript.jtp?v=19), e.g., delete

  else if ($.browser.opera) return document.documentElement.clientHeight;

and then the
  return Math.max(document.body.scrollHeight, document.body.offsetHeight);

will return the correct value.

Feel free to email me at miket [[attttt]] opera.com if you have any further questions.
Reply | Threaded
Open this post in threaded view
|

Re: Opera Web Browser Problem

Hugo <Nabble>
Thanks a lot, Mike! You are the man!

I tested this and it really works. So our embeddable apps will work fine with Opera after the next release, which should happen later today.
Reply | Threaded
Open this post in threaded view
|

Re: Opera Web Browser Problem

GregChapman
In reply to this post by miketaylr
I have just received this from the host of my nPOPuk site at:
http://npopuk.org.uk
(Yes, I know it needs some fixes to the CSS!)
 
So it looks like the Opera guys really are ganging up you, Nabble! :-)

Let's hope the fix can be applied soon!

Greg,

Mike Taylor of Opera Software noticed our reported problems with Nabble and Opera, and came up with a fix, per message below, which is my response to him.


--------------------------------------------------
To: miket@opera.com
Subject: Re: Nabble forum bug report
Date: Mon, 8 Aug 2011 10:17:16 -0700

> Hello there,
>
> I'm looking at the bug you reported regarding embedded Nabble forums. I've contacted them with a fix, but who knows how long it will take them to push it out.
>
> Do you run any Nabble-based fora? If so, the fix is pretty easy: in the http://nabble.documentfoundation.org/Javascript.jtp?v=19 Nabble.getHeight() function, just remove the following line:
>
> else if ($.browser.opera) return document.documentElement.clientHeight;
>
> Cheers,
>
> --
> Mike Taylor
> Opera Software

Hi Mike,

Thanks.  Looks like you've gone the extra mile here.  Nabble is a nice service, and Opera is a nice browser, and it will be nice if they can work together better.

I haven't looked at the fix you offer in the context of the code where it exists, yet, but what it seems that you are saying is that the problem is in Nabble, not Opera, and almost looks like they intentionally broke it!  Or maybe, they had coded a work-around for some prior Opera non-conformity that should have been version specific?

(I realize the standards are getting tightened up, and that things that used to be open to interpretation are now getting nailed down).

There in an open source project called nPOPuk that I am involved with a bit, and it is using a Nabble forum.

You can find it at http://npopuk.org.uk/2.16/forum.htm

Since we are just referring to their embedded forum hosting service, I don't think we can apply the fix directly, but have to wait for them.

Glenn



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/npopdev/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/npopdev/join
    (Yahoo! ID required)

<*> To change settings via email:
    npopdev-digest@yahoogroups.com
    npopdev-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    npopdev-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Opera Web Browser Problem

miketaylr
In reply to this post by Hugo <Nabble>
Thanks Hugo!
12