Skip to content

Width initial value is always identified as 0 #860

@andreas-trad

Description

@andreas-trad

Your system information

  • VelocityJS version: 2.0.2
  • Browser: Chrome OS Version 64.0.3282.190 (Official Build) (64-bit)
  • Operating System: Chrome OS Version 64.0.3282.190 (Official Build) (64-bit)

Checklist

  • Is this an issue with code?: [Yes/No] yes
  • Is this an issue with documentation?: [Yes/No] no
  • Have you reproduced this in other browsers?: [Yes/No] no
  • Have you checked for updates?: [Yes/No] yes
  • Have you checked for similar open issues?: [Yes/No] yes

Please remember that this is an issue tracker, support requests should be posted on StackOverflow - see CONTRIBUTING.md

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen.

Steps for reproducing this issue (code):

  1. create an html page and anywhere in the body add an element with id "test-width"
  2. initialise element's width through (either inline or through <style> block or through external css file) to any value (e.g. 450px, 100%)
  3. Run Velocity(document.querySelectorAll('#width-test'), "style", "width"); You get "0"
  4. Run an animation that animates width of the "#width-test" element to 800px. Inspect that the animation always starts width from 0 pixels, no matter what the real inital value of it was

JSFiddle example showing issue in action (code):

https://jsfiddle.net/w90o37pb/3/

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions