IE FB.login callback not running and XD proxy window left open - javascript

I am having problems getting Facebook login to work correctly in IE. The problem is intermittent. Usually, when it makes the call to FB.login, the popup appears but stays on an empty white page, XD proxy, and never runs the callback. Occasionally, the callback will run, but the window will not close - I think this may be the first time I try it after rebooting my machine (closing and opening the browser does not have the same effect).
You can see this problem on www.runescape.com/, yet with the same code on www.waroflegends.com/, the login seems to work correctly.
I have searched and found a lot of talk on the XD Proxy topic, but none of the solutions seem to work for me. I have tried adding a custom channel url and making sure the fb div is the first child of the body to no effect.

I've been experiencing the same issue in IE9, and it seemed to stem from upgrading to Flash Player 10. I'd lost hope in trying to fix it since finding an open bug at Facebook covering it. But Henson has posted an answer that fixed it for me. In the JavaScript in my site master I removed the lines
FB.UIServer.setLoadedNode = function (a, b) {
//HACK: http://bugs.developers.facebook.net/show_bug.cgi?id=20168
FB.UIServer._loadedNodes[a.id] = b;
};
and now it works. (N.B. I have not checked to see if the IE8 issue those lines were intended to overcome returns.) If that's not it take a look at some of the answers suggested in FB.login dialog does not close on Google Chrome

Try this right after FB.init:
if($.browser.msie || $.browser.opera) { // yes, this is jQuery :)
FB.XD._transport = 'fragment';
FB.XD.Fragment._channelUrl = yourChannelUrl;
}

Related

skrollr mobile clicking on item returns error

I am using the skrollr plugin for parallax https://github.com/Prinzhorn/skrollr. I know it works fine on iPad 3 and iPhone 4S with version 6.1.3.
However, on an iPad 2 version 5.1.1 and several various Android devices, I have run into an issue where if I attempt to click on any link...or really anything at all...I get a message that says:
"JavaScript:Error undefined TypeError:'undefined' is not a function".
I isolated the issue to skrollr.js about line 649 initialElement.click();. If I remove that call, then the error no longer happens...except obviously I still can't click on anything.
Also, I know for sure that this is an error in the plugin itself because I tried clicking on things in the skrollr demo and get the same error http://prinzhorn.github.io/skrollr/.
Has anyone come upon a solution for this? I haven't seen it posted anywhere. Also I've already tried alternatives such as:
initialElement.mousedown('click');
initialElement.trigger('click');
initialElement.bind('click');
initialElement.live('click');
initialElement.delegate('click');
and all give the same exact error.
I find it strange that it doesn't occur in all devices, and the rest of the plugin seems to be working...so it's not an issue on where I'm importing it...heck even everything else attached to initialElement seems to be okay.
Any ideas?
Once again, I would give you a link to my site but can't due to disclosure agreement. But if you need snippets of code let me know.
Thanks for the help!! :)
Maybe give this a shot at line 644 - https://gist.github.com/JustinWUP/6032497
Changing the following on skrollr.js worked for me. [Added $() around the 'initialElement']
if(distance2 < 49) {
//It was a tap, click the element.
//initialElement.focus();
//initialElement.click();
$(initialElement).focus();
$(initialElement).click();
return;
}

jquery ajax chat scrollbar chrome

this question is very similar to many other questions posted on stack overflow,I have found about a few solutions that I based my code on but no help with what I'm searching for on, Overstack , yelotofu and a few similar posts ... (This is kind of related to another question I've posted a few days ago but I'm pretty sure it's inactive by now since I got my answer so).
So I've basically created an ajax chat application and I want the scroll bar of a div to check if it's at the button and if it is show the message then scroll. I have found 3 main ways to do this(removed one of them because the basics of it were the same as the others)
either:
if($("#chatscreen")[0].scrollHeight - $("#chatscreen").scrollTop() == $("#chatscreen").outerHeight())
{
alert("work");
}
or
$("#chatscreen").scroll(function(){
if($(this)[0].scrollHeight - $(this).scrollTop() == $(this).outerHeight())
{
alert("work");
}
});​
I have tested the first code on firefox, internet explorer and chrome, it worked great on firefox and internet explorer but not on chrome.
The only real difference between them is $("#chatscreen").scroll(function(){ which basically keeps executing the script when the scrollbar is being used and for some reason this worked while bugging all 3 browsers I have tried making them unusable.
And so I've been trying to find a good alternative that could work on both firefox, chrome and internet explorer.
Thank you for any help/advice you can provide.
I figured out why it wasn't working, on chrome
$("#chatscreen")[0].scrollHeight - $("#chatscreen").scrollTop() == $("#chatscreen").outerHeight()
was false, Still not sure why it works when we added the .scroll() but well the above equation needed to be changed by adding a -1 to the end result to make it work.
Writing this here because it might help someone some day...

Javascript location.replace bug in Opera

I'm am doing a JS location.replace in Opera. There is a known bug that the location does not get replaced but updated when only the location.hash changes (see http://my.opera.com/community/forums/topic.dml?id=568931).
I was trying to do the following workaround:
var url = location.href.split("#")[0];
if (window.opera) {
window.history.back();
}
location.replace(url + '#' + newhash);
Unfortunately that does not seem work. Before I start experimenting with setTimeout, I wanted to check if maybe someone has a better idea.
I think the best workaround for this is to not work around it at all.
Reasoning: firstly, the script running in this page should be terminated if I use the back button, or history.back() is called. Hence, in your workaround above the script will (or should) actually stop running before the location.replace() call. We can not remember that you wanted to call location.replace() and do it on the page you've gone back to, because that would be a script injection security issue.
Secondly, even if this workaround worked I would very much recommend not using it. The reason is that Opera will eventually fix its bug. If an end user used a fixed Opera version and a page running your script, each click on one of your links would remove one entry from that user's browsing history..
For a proper solution, you could investigate history.replaceState() - a new method specified in HTML5: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#dom-history-replacestate
Can you clarify a bit? I took the example from the forum link you posted and uploaded it here: http://people.opera.com/miket/tmp/replace.html. In Opera 11.61/Mac, it appears to work as expected.
Are you seeing something different? Can you explain your problem in more detail?

fb:loggin-button gets stuck [duplicate]

I am having problems getting Facebook login to work correctly in IE. The problem is intermittent. Usually, when it makes the call to FB.login, the popup appears but stays on an empty white page, XD proxy, and never runs the callback. Occasionally, the callback will run, but the window will not close - I think this may be the first time I try it after rebooting my machine (closing and opening the browser does not have the same effect).
You can see this problem on www.runescape.com/, yet with the same code on www.waroflegends.com/, the login seems to work correctly.
I have searched and found a lot of talk on the XD Proxy topic, but none of the solutions seem to work for me. I have tried adding a custom channel url and making sure the fb div is the first child of the body to no effect.
I've been experiencing the same issue in IE9, and it seemed to stem from upgrading to Flash Player 10. I'd lost hope in trying to fix it since finding an open bug at Facebook covering it. But Henson has posted an answer that fixed it for me. In the JavaScript in my site master I removed the lines
FB.UIServer.setLoadedNode = function (a, b) {
//HACK: http://bugs.developers.facebook.net/show_bug.cgi?id=20168
FB.UIServer._loadedNodes[a.id] = b;
};
and now it works. (N.B. I have not checked to see if the IE8 issue those lines were intended to overcome returns.) If that's not it take a look at some of the answers suggested in FB.login dialog does not close on Google Chrome
Try this right after FB.init:
if($.browser.msie || $.browser.opera) { // yes, this is jQuery :)
FB.XD._transport = 'fragment';
FB.XD.Fragment._channelUrl = yourChannelUrl;
}

Sometimes FCKeditor doesn't load in Firefox

I am unable to replicate the problem when I want to but it seems like every now and then, my site using FCKeditor will load the interface but not the content (Clicking the buttons don't do anything). No javascript errors show and once it starts doing it, it usually is tough to get back to normal. The way I found to work best is to click the refresh button multiple times in a row, then the FCKeditor loads correctly. I have only seen this in Firefox
Has anyone else run into this problem or know a solution. It is a little annoying for me but I am afraid my client would be really confused
I have experienced the phenomenon you describe in FCKEditor's successor, CKEditor. Somehow, the IFRAME that contains the WYSIWYG content doesn't get loaded. What always helps is switching to source code view and back, but that's no solution.
I have seen the problem described on the Internet but with no solution.
Caching is not the problem, I think. Sometimes, if you press "reload" 20 times, it will break at the 21th time, and work again on the 22nd time.
What minimized the number of occurrences for me was to activate the thingy to the editor's bottom that shows the element path (body > p > span, I forgot it's name). I don't now why but since I turned it on, it very rarely breaks any more.
I have had this problem. I solved it by pre-loading FCKeditor in a hidden iframe during the login process so that when it got to the pages where it was used it was already in the cache.
i would strongly advise to upgrade to CKEditor which can not only be spelled out verbally without offending anyone, but also optimizes the loading time to minimal. I find it much more responsive than his F- friend.
I encountered this problem with firefox (not reproducible) and chrome (reproducible).
The solution that worked quite well in both cases was to wait for some milliseconds before initializing CKE :
setTimeout(function() {textarea.ckeditor({customConfig : 'custom/schnonfig.js'})} , 100);

Categories

Resources