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

error using plax with bonzo via ender #18

Open
stephenhandley opened this issue Mar 27, 2012 · 1 comment
Open

error using plax with bonzo via ender #18

stephenhandley opened this issue Mar 27, 2012 · 1 comment

Comments

@stephenhandley
Copy link

there seems to be a conflict with plax and bonzo:

when running with the following ender build

ender-js backbone qwery bonzo bean domready bowser ender-bootstrap ender-json browser-request morpheus plax

on page load i get:

TypeError: 'undefined' is not an object (evaluating 'el.style.position')

seems to raise a conflict within bonzo's dim function (line #8 below):

 , dim: function () {
          if (!this.length) return { height: 0, width: 0 }
          var el = this[0]
            , orig = !el.offsetWidth && !el.offsetHeight ?
               // el isn't visible, can't be measured properly, so fix that
               function (t, s) {
                  s = {
                      position: el.style.position || ''
                    , visibility: el.style.visibility || ''
                    , display: el.style.display || ''
                  }
                  t.first().css({
                      position: 'absolute'
                    , visibility: 'hidden'
                    , display: 'block'
                  })
                  return s
                }(this) : null
            , width = el.offsetWidth
            , height = el.offsetHeight

          orig && this.first().css(orig)
          return {
              height: height
            , width: width
          }
        }
@cameronmcefee
Copy link
Owner

@ded this might be more your ballgame.

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

2 participants