Fix transition sometimes keeping inline style unnecesarily
Fixes #1291 Fixes issue with nested dropdown menus appearing.