[[ Bug 12898 ]] Make sure mouse state is synched before starting a modal session.
Merge branch 'bugfix-12898' into develop