jQWidgets Forums

jQuery UI Widgets Forums General Discussions Upgrade from 3.0.2 to 3.0.3 – Breaking Changes (sort of)

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  aoverton07 11 years, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • aoverton07
    Participant

    Just to save someone some headache I experienced a few “breaking changes” (i use quotations because they arent REALLY breaking changes but it can appear that way at first glance).

    -It seems that the “Invalid jQuery Selector” rule has gotten a little more strict, as it picked up quite a few “hanging” references that the last version did NOT. Actually helped clean my code up quite a bit, thank you jqwidget team!

    -Also if you are getting a “cannot read property ‘length’ of undefined” error it is most likely due to the autoloadstate/loadstate methods in one of your grids. You’ll need to turn these off, save the state in local storage, then turn the loadstate features back on (the methods are trying to read something that isnt there yet, no biggy)

    Hope it helps!

    Also, have to add that I really like the “lazy loading” features added to the tabs/grids! keeps the DOM count and Event Listener Count WAYYYYY down until resources are absolutely needed. And it appears that the event listener issue for the grid-sortable has been fixed! Thanks!!


    Peter Stoev
    Keymaster

    Hi aoverton07,

    That is true – “Invalid jQuery Selector” is stricter now. You cannot initialize a widget from invalid DOM element and that exception just points out to the users that they have a typo in their code or try to create something which is not possible to be created. ‘cannot read property ‘length’ is something which we have not observed, but will investigate it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    aoverton07
    Participant

    the “cannot read property length” came from the loadstate method, either the method was looking for the state in Local Storage in the wrong place (or wrong name) or I did not have a state stored at all in Local Storage. Not necessarily an error, but if there is no “state” in Local Storage, maybe the method can just load defaults, rather than raising the jquery exception.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.