Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$.support collision with bootstrap #67

Open
jgrund opened this issue Aug 28, 2012 · 11 comments
Open

$.support collision with bootstrap #67

jgrund opened this issue Aug 28, 2012 · 11 comments
Assignees
Milestone

Comments

@jgrund
Copy link

jgrund commented Aug 28, 2012

I am using bootstrap and jquery.transit together on a project.

There is a naming collision in the way $.support.transition is used by both libraries.

Where transit does this:

  support.transition      = getVendorPropertyName('transition');
  support.transitionDelay = getVendorPropertyName('transitionDelay');
  support.transform       = getVendorPropertyName('transform');
  support.transformOrigin = getVendorPropertyName('transformOrigin');
  support.transform3d     = checkTransform3dSupport();

  $.extend($.support, support);

Bootstrap does this:

 $.support.transition = (function () {

      var transitionEnd = (function () {

        var el = document.createElement('bootstrap')
          , transEndEventNames = {
               'WebkitTransition' : 'webkitTransitionEnd'
            ,  'MozTransition'    : 'transitionend'
            ,  'OTransition'      : 'oTransitionEnd otransitionend'
            ,  'transition'       : 'transitionend'
            }
          , name

        for (name in transEndEventNames){
          if (el.style[name] !== undefined) {
            return transEndEventNames[name]
          }
        }

      }())

      return transitionEnd && {
        end: transitionEnd
      }

    })()

As you can see, transit sets support.transition to a string while Bootstrap assigns an object literal. This is causing bootstrap modal to not work correctly when it searches for the $.support.transition.end property.

@clemenshelm
Copy link

+1 for this issue!

@AmyGail
Copy link

AmyGail commented Oct 11, 2012

+2!
If anyone has a workaround/patch. I'd be grateful if you'd share.

@ghost ghost assigned rstacruz Dec 13, 2012
@rstacruz
Copy link
Owner

The fix is to remove this line, actually:

  $.extend($.support, support);

@rstacruz
Copy link
Owner

Bootstrap doesn't seem to be respecting jQuery conventions. jQuery's documentation (here) seems to suggest that $.support.xxx should be set to a string of the vendor-prefixed version of xxx, which Transit does, but Bootstrap doesn't.

In any case, let me fix this.

@rstacruz
Copy link
Owner

Test it out in v0.9.9, guys.

@blakeperdue
Copy link

This is still an issue with v0.9.9 and Bootstrap v3.1.1

@furioursus
Copy link

I can confirm that this is still not working with Bootstrap 3.1.1 and Transit 0.9.9

@rstacruz
Copy link
Owner

Can anyone check out #143 and see if it fixes your problem?

@rstacruz rstacruz reopened this Apr 26, 2014
@rstacruz
Copy link
Owner

...that is, see if @isochronous's fork here works for you. As I don't have a bootstrap project easily-accessible right now to try it on, perhaps any of you kind folks can help me test it :)

@furioursus
Copy link

Yup, that fork resolves the issue. Thanks!

On Fri, Apr 25, 2014 at 9:33 PM, Rico Sta. Cruz [email protected]:

...that is, see if @isochronous https://github.com/isochronous's fork
herehttps://raw.githubusercontent.com/isochronous/jquery.transit/955551641d64066766313223d9b91f6ccdc531d6/jquery.transit.jsworks for you. As I don't have a bootstrap project easily-accessible right
now to try it on, perhaps any of you kind folks can help me test it :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/67#issuecomment-41459658
.

Christopher Kennedy
Web Designer, ExpressionEngine & Craft CMS Developer

Part-time Haberdasher, full-time Crazy Cat Lady

{one:bright:light}
about.me/christopherkennedy

Google Voice: (415) 226-9663
Twitter: @onebrightlight

@rstacruz
Copy link
Owner

Thanks! Will review it in a while and merge it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants