tel8618217223380 / gwtquery

Automatically exported from code.google.com/p/gwtquery
MIT License
0 stars 0 forks source link

In Chrome, css value for position always comes back as empty. #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
- GQuery.$("<div>hello</div>").css("position","absolute").css("position")

What is the expected output? What do you see instead?
- I expect "absolute" from the line above but I get "".

What version of the product are you using? On what operating system?
- GWT 2.3, gwtquery-1.1.0

Please provide any additional information below.
- The actual problem I am having is during animation; it is setting the 
position to relative when I really need it to be absolute.  One of the first 
steps of the animation (onStart) checks to see if the animation is a move event 
and checks the position.  It comes back as a blank position and in turn gets 
the position set to "relative".

Original issue reported on code.google.com by SciSp...@gmail.com on 7 Oct 2011 at 2:51

GoogleCodeExporter commented 9 years ago
Try to use css("position", false)

Original comment by manuel.carrasco.m on 25 Oct 2011 at 9:04

GoogleCodeExporter commented 9 years ago
It is actually part of the animation code for GQuery (PropertiesAnimation).

if (move && !g.css("position", true).matches("absolute|relative")) {
  g.css("position", "relative");
}

There are a couple workarounds but the easiest seems to setting a css value to 
important so the weight of the css value will not be replaced by a inline style.

Original comment by SciSp...@gmail.com on 25 Oct 2011 at 2:10

GoogleCodeExporter commented 9 years ago
Could you send a piece of code to see the problem?

Thx
- Manolo

Original comment by manuel.carrasco.m on 18 Dec 2011 at 4:33

GoogleCodeExporter commented 9 years ago
Thanks for reporting. I've migrated this issue to github : 
https://github.com/gwtquery/gwtquery/issues/141
Please follow the issue there.

Original comment by julien.d...@gmail.com on 15 Jul 2013 at 4:45