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

Doesn't work if non-pixel value given for scrollY #33

Open
DataTables opened this issue Aug 18, 2014 · 4 comments
Open

Doesn't work if non-pixel value given for scrollY #33

DataTables opened this issue Aug 18, 2014 · 4 comments

Comments

@DataTables
Copy link
Collaborator

The height measurement for the viewport doesn't work correctly if a non-pixel values is given for DataTables' scrollY option (for example give 10em).

See http://datatables.net/forums/discussion/22899 for more.

@Gudahtt
Copy link
Contributor

Gudahtt commented May 5, 2017

I've encountered this problem recently using scrollY values with the unit vh.

The current behavior, which essentially just uses parseFloat on the string (e.g. parseFloat('10em') -> 10), could be improved to at least be correct for vh units.

Would you accept a PR to improve this string parsing to be less wrong?

@DataTables
Copy link
Collaborator Author

Certainly would :-)

@nekromoff
Copy link

Is this still something that is planned to be fixed? I would like to have scroller take only the rest of available viewport (e.g. 90%), but this does not work. Is it possible for the scroller to fill in whatever is left of the viewport (e.g. extende between existing element and the end of HTML / viewport bottom)

@DataTables
Copy link
Collaborator Author

90vh would be the way to do this. That fix was merged in above.

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