Side navigation
#7470 closed bug (invalid)
Opened November 11, 2010 10:05AM UTC
Closed November 11, 2010 09:23PM UTC
Last modified March 13, 2012 04:36PM UTC
Cross-Compatibility IE 7 and 8 tested
Reported by: | martin@appware.co.uk | Owned by: | martin@appware.co.uk |
---|---|---|---|
Priority: | undecided | Milestone: | 1.5 |
Component: | unfiled | Version: | 1.4.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Bug Occurs in version 1.4.2 and 1.4.3
Location to test from
http://appware.co.uk/live/showscreen.php?site_id=95&screentype=folder&screenid=1463
jQuery Code used to reproduce bug
Now this has been tested in Safari, Google Chrome, IE9, IE8*, IE7*, Firefox 3, Firefox 4
- = error is created
For some reason the code is not saving as it should be and does in other browsers
Ths code is supposed to read the elements of a list, delete them and add them as needed the problem is the elemenets are not being saved into the op._elements array or read from it correctly. as it is not placing the data into the output zone correctly.
Attachments (0)
Change History (10)
Changed November 11, 2010 02:04PM UTC by comment:1
description: | Bug Occurs in version 1.4.2 and 1.4.3 \ \ Location to test from \ [http://appware.co.uk/live/showscreen.php?site_id=95&screentype=folder&screenid=1463] \ \ jQuery Code used to reproduce bug \ \ For HTML and init code please use the test location \ \ {{{ \ jQuery.fn.carousel = function(op){ \ // merge the options over-top of the defaults \ op = $.extend({ \ left_btn:'', \ right_btn:'', \ list:'', \ width:'0px', \ _elements:[], \ _current:0, \ _locked:false \ }, op); \ \ // check for left_btn if not set throw error \ if(op.left_btn == ''){ \ throw "Error jQuery Carousel left_btn not defined"; \ } \ \ // check that width is defined \ if(op.width == '0px'){ \ throw "Error jQuery Carousel width not defined"; \ } \ \ // check for right_btn if not set throw error \ if(op.right_btn == ''){ \ throw "Error jQuery Carousel right_btn not defined"; \ } \ \ // check for list if not set throw error \ if(op.left_btn == ''){ \ throw "Error jQuery Carousel list not defined"; \ } \ \ // set up left button click event \ $(op.left_btn).click(function(){ \ // check for lock only run if lock is disabled \ if(op._locked == false){ \ // activate lock \ op._locked = true; \ // save the currently open view \ var last = op._current; \ // set the current to the next view \ if(op._current == 0){ \ op._current = op._elements.length -1; \ }else{ \ op._current -= 1; \ } \ // add the previus element to the beging \ $("#carru").prepend($(op._elements[op._current])); \ \ $(op._elements[op._current]).css({width:"0px"}); \ \ // set the currently live view to shrink to the left \ $(op._elements[op._current]).animate( \ { \ width:op.width \ }, \ 1000, \ function(){ \ $(op._elements[last]).remove(); \ op._locked = false; \ } \ ); \ } \ }); \ \ // set up the right button click event \ $(op.right_btn).click(function(){ \ // check for lock only run if lock is disabled \ if(op._locked == false){ \ // activate lock \ op._locked = true; \ // save the currently open view \ var last = op._current; \ // set the current to the next view \ if(op._current == op._elements.length-1){ \ op._current = 0; \ }else{ \ op._current += 1; \ } \ \ // add the previus element to the beging \ $("#carru").append($(op._elements[op._current])); \ \ // set the currently live view to shrink to the left \ $(op._elements[last]).animate( \ { \ width:'0px' \ }, \ 1000, \ function(){ \ $(op._elements[last]).remove(); \ $(op._elements[last]).css({width:op.width}); \ op._locked = false; \ } \ ); \ } \ }); \ \ // save all the li elements to a variable for access later \ $("li", op.list).each(function(){ \ $(this).css({position:'relative'}); \ op._elements[op._elements.length] = $(this); \ }); \ \ \ // set the list to hide overflowing data \ $(op.list).css({overflow:"hidden"}); \ \ // empty the list and set the new ul \ $(op.list).html("<ul id=\\"carru\\" style=\\"width:999999px;display:block;height:inherit;padding:0;margin:0;\\"></ul>"); \ \ // add the first element to the live view \ $("#carru", op.list).append($(op._elements[0])); \ } \ }}} \ \ Now this has been tested in Safari, Google Chrome, IE9, IE8*, IE7*, Firefox 3, Firefox 4 \ * = error is created \ \ For some reason the code is not saving as it should be and does in other browsers \ \ Ths code is supposed to read the elements of a list, delete them and add them as needed the problem is the elemenets are not being saved into the op._elements array or read from it correctly. as it is not placing the data into the output zone correctly. \ \ → Bug Occurs in version 1.4.2 and 1.4.3 \ \ Location to test from \ [http://appware.co.uk/live/showscreen.php?site_id=95&screentype=folder&screenid=1463] \ \ jQuery Code used to reproduce bug \ \ http://jsfiddle.net/SVy8m/ \ \ Now this has been tested in Safari, Google Chrome, IE9, IE8*, IE7*, Firefox 3, Firefox 4 \ * = error is created \ \ For some reason the code is not saving as it should be and does in other browsers \ \ Ths code is supposed to read the elements of a list, delete them and add them as needed the problem is the elemenets are not being saved into the op._elements array or read from it correctly. as it is not placing the data into the output zone correctly. \ \ |
---|
Changed November 11, 2010 02:14PM UTC by comment:2
owner: | → martin@appware.co.uk |
---|---|
status: | new → pending |
We ask that you provide a reduced test-case without the jcarousel dependency, so we can verify that the issue is in jQuery and not jCarousel. Thank you.
Changed November 11, 2010 02:27PM UTC by comment:3
status: | pending → new |
---|
Hi this is not depended on any thing,
It is home built code it is only using the jQuery Core there is nothing extra involved if you looked at the jsFiddle code you will see that,
I have just named it the same thing while developing.
But if you look at the jsFiddle code you will see it only using jQuery its not even using jQuery UI
Changed November 11, 2010 02:59PM UTC by comment:4
_comment0: | A) the $(), used on the second to last line, is no longer a shortcut to $(document) in jQuery 1.4, whereas it was in 1.3. That line of code doesn't make sense anymore. \ B) You are initialising the settings object op as a global variable, which could cause conflicts for you later on. \ C) This is not what we consider to be a valid test case. It is way too much code and moving parts for us to possibly distill ONE SIMPLE ISSUE from it. We understand that debugging IE can be a pain in the arse sometimes, but that doesn't mean that your IE bug is a jQuery bug. If you need support please go to the jQuery Forum \ == http://forum.jquery.com == \ D) If you can in fact distill a simple testcase (hint:a simple test case is typically not 120 lines of code) that ilustrates the issue, please do so. Otherwise this ticket will be closed shortly as invalid. → 1289487660966906 |
---|---|
_comment1: | A) the $(), used on the second to last line, is no longer a shortcut to $(document) in jQuery 1.4, whereas it was in 1.3. That line of code doesn't make sense anymore. \ B) You are initialising the settings object op as a global variable, which could cause conflicts for you later on. \ C) This is not what we consider to be a valid test case. It is way too much code and moving parts for us to possibly distill ONE SIMPLE ISSUE from it. We understand that debugging IE can be a pain in the arse sometimes, but that doesn't mean that your IE bug is a jQuery bug. If you need support please go to the jQuery Forum (http://forum.jquery.com) \ D) If you can in fact distill a simple testcase (hint:a simple test case is typically not 120 lines of code) that ilustrates the issue, please do so. Otherwise this ticket will be closed shortly as invalid. → 1289487682122330 |
A) the $(), used on the second to last line, is no longer a shortcut to $(document) in jQuery 1.4, whereas it was in 1.3. That line of code doesn't make sense anymore.
B) You are initialising the settings object op as a global variable, which could cause conflicts for you later on.
C) This is not what we consider to be a valid test case. It is way too much code and moving parts for us to possibly distill ONE SIMPLE ISSUE from it. We understand that debugging IE can be a pain in the arse sometimes, but that doesn't mean that your IE bug is a jQuery bug. If you need support please go to the jQuery Forum (http://forum.jquery.com)
D) If you can in fact distill a simple testcase (hint:a simple test case is typically not 120 lines of code) that ilustrates the issue, please do so. Otherwise this ticket will be closed shortly as invalid.
Changed November 11, 2010 08:25PM UTC by comment:5
Sorry you seem to be missing the point here.
All i am using is jQuery no Native Javascript just jQuery and it works in Chrome, Safari, Firefox, and Event IE9 but not in IE7 and IE8 and untested in IE6,
Now if the code works and all it uses is jQuery no javascript there is a problem with the cross compatibly some thing is working in the others but not the old & current versions of IE means that some thing breaks in one of the calls fails to work in IE ok the test case is not the best but you should not invalid the bug as there is defiantly a bug there as a fellow developer i would not ignore a bug ok i might not be able to work on it but i would leave it to see if any one else can find any information on what is creating the bug.
Changed November 11, 2010 09:23PM UTC by comment:6
_comment0: | This bug tracker exists because we do not want to ignore bugs. The tickets that come into the tracker are reviewed by a group of people with collective years of experience developing with jQuery and JavaScript, debugging jQuery problems, dealing with cross-browser issues. We want to know about any and all jQuery bugs. \ \ If we examine a test case and are not easily able to discern the bug that is being reported, or any bug at all, we will return it to be simplified, as was the case here. If our collective judgment indicates to us that the bug is not in jQuery, but rather in user code, we will not attempt to debug that issue further, and you are welcome to post your support issue in the forums. (http://forum.jquery.com) \ \ Because the tracker is a crucial tool for developing jQuery, we cannot leave bugs we know to be invalid open for indefinite periods of time in the hopes a random stranger decides to investigate it on day. → 1289511831651635 |
---|---|
resolution: | → invalid |
status: | new → closed |
This bug tracker exists because we do not want to ignore bugs. The tickets that come into the tracker are reviewed by a group of people with collective years of experience developing with jQuery and JavaScript, debugging jQuery problems, dealing with cross-browser issues. We want to know about any and all jQuery bugs.
If we examine a test case and are not easily able to discern the bug that is being reported, or any bug at all, we will return it to be simplified, as was the case here. If our collective judgment indicates to us that the bug is not in jQuery, but rather in user code, we will not attempt to debug that issue further, and you are welcome to post your support issue in the forums. (http://forum.jquery.com)
Because the tracker is a crucial tool for developing jQuery, we cannot leave bugs we know to be invalid open for indefinite periods of time in the hopes a random stranger decides to investigate it on day.
By the way, jQuery is a JavaScript library. If you are using jQuery, you are using Native JavaScript.
Changed November 12, 2010 09:37AM UTC by comment:7
_comment0: | Ok i have tried to be helpfull and polite now your rudeness is annoying me you want a smaller test case here \ \ [http://jsfiddle.net/barkermn01/SVy8m/2/] \ \ Was that hard all i have done is removed the click evens and the users error checking as if you could flaming read you would see \ \ "problem is the elements are not being saved into the op._elements array or read from it correctly" \ \ \ Which means I told you it was on the code's execution. so if any one looked that the code they could have seen all the needed to do was remove the click event, as I have updated for you its code size is \ \ As to the use of $() I no it does not link to the document I know and don't want it to I just want to access the jQuery Core not an element though the core. \ \ So you experts in jQuery programming it for years if complete bull shit as they don't know much about it! \ → 1289873119554269 |
---|
Ok i have tried to be helpfull and polite now your rudeness is annoying me you want a smaller test case here
http://jsfiddle.net/barkermn01/SVy8m/2/
Was that hard all i have done is removed the click evens and the users error checking as if you could flaming read you would see
"problem is the elements are not being saved into the op._elements array or read from it correctly"
Which means I told you it was on the code's execution. so if any one looked that the code they could have seen all the needed to do was remove the click event, as I have updated for you its code size is
As to the use of $() I no it does not link to the document I know and don't want it to I just want to access the jQuery Core not an element though the core.
Changed November 16, 2010 02:14AM UTC by comment:8
@martin
I must say I have seldom encountered someone like you. Who simply is unwilling to follow How to report bugs and provide a reduced test case. Instead you start insulting the staff because we don't debug a cross-browser issue in a code pile of yours. It's nothing uncommon that some code works in most browsers but not IE. This has nothing to do with jQuery. If it breaks in IE the cause is most likely IE.
Until proven otherwise you should have reduced to find out what/where it breaks in IE and then check if it's something jQuery needs to workaround or doesn't.
So hadn't you been too lazy to do that you would have come up with this test case. This is also a nice example what we understand by reduced test case (6 lines of js and a bit of markup).
So here we can see that IE looses the reference to the contents of the li's when setting the innerHTML of the ul (all other browsers don't). So this isn't a jQuery bug but an IE bug. Just use clone()
In your code to fix it that would be
$("li", op.list).each(function(){ $(this).css({position:'relative'}); //using clone() fixes the IE problems op._elements[op._elements.length] = $(this).clone(); });
So by reducing your code and trying clone()
you could have saved us and yourself time and nerves
Changed November 16, 2010 09:11AM UTC by comment:9
Ok thanks for that it avoided the problem.
Now i'm not trying to be a dick i'm try to prove the point that when you say
Cross-Compatibility you mean Cross-Browser http://en.wikipedia.org/wiki/Cross-browser
Now as your a jQuery is a library i should not have to add code to support IE that's jQuerys job now i am very grateful for that fix but you added code just to support IE now that is a bug by what jQuery advertises as. if you have to add code to add support for IE its not Cross-Compatibility / Cross-Browser as my code that worked with every other browser excluding IE7, IE8 and untested in IE6,
So again thanks for the fix, but please see my point.
Changed November 16, 2010 02:57PM UTC by comment:10
You're point is still inapplicable. Your argument that we've "added code just to support IE" is simply incorrect as it implies that we've provided some means that falls outside of the jQuery API. So, just like using the right tool from your toolbox for the job at hand, clone() is part of the jQuery API and serves it's purpose well.
Please try to be more respectful to those that wish to help you solve your issues. This particular issue SHOULD have been posted on forum.jquery.com, but we helped anyway. Keep in mind that we are volunteers as well and written abuse and flaming will not be tolerated.
Be excellent to each other.