Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » Internet Explorer - Give it a Whirl
- AdamLaughlin
- Scratcher
66 posts
Internet Explorer - Give it a Whirl
We squashed many IE bugs last week.
IE8 and IE9 should be operating on par with Chrome and Firefox. Try it out!
Please post in this thread if you have any issues.
Cheers!
IE8 and IE9 should be operating on par with Chrome and Firefox. Try it out!
Please post in this thread if you have any issues.
Cheers!
Adam Laughlin - Scratch 2.0 Front-End Developer
Windows 7. Chrome, Firefox, IE8, IE9.
Generally active on Tuesdays and Thursdays.
- AdamLaughlin
- Scratcher
66 posts
Internet Explorer - Give it a Whirl
We're on SWF version 207, though the SWF version is unrelated to the unloading and forum issues.
Just did it in IE8 and IE9 after refreshing. Empty cache. Both times it submitted correctly. Weird. I'll look around.
How are projects working for you?
Just did it in IE8 and IE9 after refreshing. Empty cache. Both times it submitted correctly. Weird. I'll look around.
How are projects working for you?
Last edited by AdamLaughlin (Jan. 8, 2013 16:15:10)
Adam Laughlin - Scratch 2.0 Front-End Developer
Windows 7. Chrome, Firefox, IE8, IE9.
Generally active on Tuesdays and Thursdays.
- AdamLaughlin
- Scratcher
66 posts
Internet Explorer - Give it a Whirl
Are you getting the error in both IE8 and IE9?
I found what would cause the problem in IE8. The developers of this forum code used a function that didn't exist in IE8.
Notes to self:
Line 64 in board.js. var text = obj.val().trim();
Hmm. That shouldn't run on any browser when clicking submit though. window.onbeforeunload is getting reset with
$("form input").click(function() {
window.onbeforeunload = null;
});
I found what would cause the problem in IE8. The developers of this forum code used a function that didn't exist in IE8.
Notes to self:
Line 64 in board.js. var text = obj.val().trim();
Hmm. That shouldn't run on any browser when clicking submit though. window.onbeforeunload is getting reset with
$("form input").click(function() {
window.onbeforeunload = null;
});
Last edited by AdamLaughlin (Jan. 8, 2013 16:21:12)
Adam Laughlin - Scratch 2.0 Front-End Developer
Windows 7. Chrome, Firefox, IE8, IE9.
Generally active on Tuesdays and Thursdays.
- nXIII
- Scratcher
1000+ posts
Internet Explorer - Give it a Whirl
AdamLaughlinJust curious—what's wrong with that?
Notes to self:
Line 64 in board.js. var text = obj.val().trim();
Hmm. That shouldn't run on any browser when clicking submit though. window.onbeforeunload is getting reset withIt might be better to use the submit event:
$("form input").click(function() {
window.onbeforeunload = null;
});
$("form [type=submit]").click(function() { //log("unbind onbeforeunload"); window.onbeforeunload = null; });
!function () { var submitted = false; var MIN_CONTENT_LENGTH = 4; $(window).bind('beforeunload', function() { if (submitted) return; var obj = $("textarea#id_body"); if (!obj.length || obj.val().trim().length < MIN_CONTENT_LENGTH) return; // TODO: Translate string return "Leave page with unsaved content?"; }); $("form [type=submit]").submit(function() { submitted = true; }); }();
EDIT: Oh, and that magic number should at least be in a constant (a setting would be better, but…)
Last edited by nXIII (Jan. 8, 2013 17:43:57)
- AdamLaughlin
- Scratcher
66 posts
Internet Explorer - Give it a Whirl
Thanks nXIII.
String.trim() is part of ECMAScript 5, which wasn't implemented in IE until IE9.
http://kangax.github.com/es5-compat-table/
That's why jQuery has the $.trim(' foo ‘) method. The DjangoBB developers used $.trim() in other files. Unsure why they didn’t use it there too.
That said, it doesn't explain why boltbait would be getting the error in Chrome, and I can't reproduce on the same OS and same browser. I'm implementing additional error tracking code right now so we hopefully get a better picture of what's happening.
Adam
String.trim() is part of ECMAScript 5, which wasn't implemented in IE until IE9.
http://kangax.github.com/es5-compat-table/
That's why jQuery has the $.trim(' foo ‘) method. The DjangoBB developers used $.trim() in other files. Unsure why they didn’t use it there too.
That said, it doesn't explain why boltbait would be getting the error in Chrome, and I can't reproduce on the same OS and same browser. I'm implementing additional error tracking code right now so we hopefully get a better picture of what's happening.
Adam
Adam Laughlin - Scratch 2.0 Front-End Developer
Windows 7. Chrome, Firefox, IE8, IE9.
Generally active on Tuesdays and Thursdays.
- AdamLaughlin
- Scratcher
66 posts
Internet Explorer - Give it a Whirl
BoltBait
I'm not getting any of those messages today.
Did you change something?
Nope. Glad to hear it's working for you!
Adam Laughlin - Scratch 2.0 Front-End Developer
Windows 7. Chrome, Firefox, IE8, IE9.
Generally active on Tuesdays and Thursdays.
- nXIII
- Scratcher
1000+ posts
Internet Explorer - Give it a Whirl
AdamLaughlinAh, of course. Thanks for explaining
String.trim() is part of ECMAScript 5, which wasn't implemented in IE until IE9.
http://kangax.github.com/es5-compat-table/
That's why jQuery has the $.trim(' foo ‘) method. The DjangoBB developers used $.trim() in other files. Unsure why they didn’t use it there too.
- Discussion Forums
- » Bugs and Glitches
- » Internet Explorer - Give it a Whirl