fix timeline float behavior

When we clear both, the float of the project menu is also factored in.

https://community.openproject.org/work_packages/16981

Will also need to be merged into release/4.0 and dev.