Fixing jquery.flot.resize ie8 'Uncaught TypeError'#1265
Closed
tleish wants to merge 1 commit into
Closed
Conversation
Even with the updated jquery.flot.resize.js I was still receiving this error in IE8 just like flot#1081. Uncaught TypeError: Cannot set property 'w' of undefined Simply fixed by adding changing the following Original: =============== function s(t,i,s){ var o=$(this),u=o.data(a); u.w=i!==n?i:o.width(), u.h=s!==n?s:o.height(), r.apply(this,arguments) } =============== to include a conditional Conditional: =============== function s(t,i,s){ var o=$(this),u=o.data(a); if(u){ u.w=i!==n?i:o.width(), u.h=s!==n?s:o.height(), r.apply(this,arguments) } } =============== No more error, resizing still works
Member
|
Editing minified code is usually problematic. Can you trace it to an existing issue upstream https://github.com/cowboy/jquery-resize so that a comment can be added if modifiying the minified code is the only option. I'd suggest trying @dnschnur's advice in the original thread around ensuring that the element is actually in the DOM. |
Author
|
I submitted a pull request to cowboy/jquery-resize (see: cowboy/jquery-resize#21), but no changes have been made to the plugin for 4 years and there are 8 pull requests (including mine), some are over 2 years old. I doubt my pull request will be merged in. |
dnschnur
added a commit
to dnschnur/flot
that referenced
this pull request
Apr 20, 2014
This updates the inline resize plugin with flot/jquery-resize@74716750f4 and flot/jquery-resize@189b555558. Fixes flot#1277 and flot#1265.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Even with the updated jquery.flot.resize.js I was still receiving this error in IE8 just like #1081.
Simply fixed by adding changing the following
Original:
to include a conditional Conditional:
No more IE8 error, resizing still works.