Jump to content
Search Community

Draggable 1.17 s.boxSizing karma issue

jmalmsten test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm attempting to test an object for my company in Karma that relies on 'draggable'. 'draggable' was built off of
 

path: {

}
shim: {
    'draggable' : {
        deps : ['TweenLite', 'cssPlugin']
    },
}

All of the tests I built passed fine, I updated my branch to reflect my companies' changes on master where they updated the path to 

path: {

}

This caused a script error in the tests with the top stacktrace pointing to: 

TypeError: 'null' is not an object (evaluating 's.boxSizing')
 
In an attempt to debug this I was able to tweak the code to work with this path setup: 

path: {

}
 
I looked at the github repos for both 1.16.1 and 1.17.0. I found that s.boxSizing does not exist on 1.16.1 so I'm going to guess that in 1.17.0 s.boxSizing is grabbed without checking to see if 's' is not null. I was wondering if there was any way the CS team here could verify what I was thinking.
 

 

Link to comment
Share on other sites

Hmm...that strikes me as a band-aid more than a solution. If "cs" is null, that means there's no computed style which is a bigger problem. Can you provide more details about your scenario? It would be amazingly helpful if you could post a reduced test case in codepen so that we can see the problem happening and poke around a bit (you can use different artwork if you're worried about NDA stuff). Would you mind? 

 

For the record, the Draggable in 1.17.0 has a bunch of enhancements that support SVG and works around various browser bugs. So if you go back a version, that's fine but you won't have those added benefits. The SVG stuff can be very tricky indeed because of all the weird browser behaviors. Are you involving SVG at all? 

Link to comment
Share on other sites

I'll give an update with a test case, might be a couple days I have a few hotfixes I need to implement beforehand.

Thanks for the prompt response!

update: I found that including:
 

 
had broken our inline modal editors(popups that appear in our editor window with buttons that change font-size, font-family, etc.. etc..)
only in IE11 though(ie9 still worked?), chrome, firefox, and safari are all fine as well.

I had to revert back to 1.15.0 on all 3 to fix this issue. Not sure if it's related to the issue above. 

I'll try to work this weekend or monday to mock up a simple test case with a similar scenario, until then have a good weekend and I hope my information helps you guys!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...