Fx.morph / Fx.tween with background-position does not work correctly #2295

Closed
mientjan opened this Issue Feb 16, 2012 · 5 comments

Projects

None yet

4 participants

@mientjan

Issue tested with 1.4.4 (http://mootools.net/core/76bf47062d6c1983d66ce47ad66aa0e0)

<style>
  body {
    background: url('background-image.jpg') no-repeat 0 0;
  }
</style>

window.addEvent('domready', function(e){
   $(document.body).morph({'background-position':'10px 100px'});
});

this results in

  • chrome 14.0.835.202 m "background-position: 10px 50%;" on the body
  • firefox 10.0.1 "background-position: 10px 50%;" on the body
  • IE6 error " Invalid argument. on line 3771 character 3
  • IE8 error " Invalid argument. on line 3771 character 3
  • IE7 error " Invalid argument. on line 3771 character 3

i think this is related to issue #2213

@ibolmo
Member
ibolmo commented Feb 16, 2012

Thanks @mientjan, but this may be a known issue and recently resolved in the master branch. Please give us a hand and test the master branch with your code.

Here are the instructions on how to build mootools: https://github.com/mootools/mootools-core/wiki/Build-MooTools-from-git-master or use this nightly build: http://mootools.net/nightly/build/mootools-core.js

@mientjan

thx for the instructions. Made a mootools-core build with no-compat and uncompressed.

Did the same tests and these are the results.

  • chrome 14.0.835.202 m works
  • firefox 10.0.1 works
  • IE6 (6.0.2900.5512.xpsp.080413-2111) no error thrown, but style is not set/animated. background-position-x and background-position-y are also not working
  • IE7 no error thrown, but style is not set/animated. background-position-x and background-position-y are also not working
  • IE8 no error thrown, but style is not set/animated. background-position-x and background-position-y work as expected.
@ibolmo
Member
ibolmo commented Feb 16, 2012

Ok thank you, we'll take a look.

@gonchuki
Contributor

fiddle showing this issue: http://jsfiddle.net/gonchuki/EG9c9/

I don't see any error on the IE console, but it still fails to apply the styles. Reproducible in all versions available at jsfiddle.

@gonchuki gonchuki added a commit to gonchuki/mootools-core that referenced this issue Aug 16, 2012
@gonchuki gonchuki Normalize backgroundPosition and ensure that backgroundPosition[XY] a…
…lways

returns something on browsers that support that extension.
Fixes #2213 and #2295
1e400ff
@arian
Member
arian commented Aug 20, 2012

Fixed in 1f73ef0

@arian arian closed this Aug 20, 2012
@ibolmo ibolmo added a commit to ibolmo/mootools-core that referenced this issue Feb 16, 2014
@gonchuki @ibolmo gonchuki + ibolmo Normalize backgroundPosition and ensure that backgroundPosition[XY] a…
…lways

returns something on browsers that support that extension.
Fixes #2213 and #2295
39481aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment