fix #40556: focus lost after duration change
Merge pull request #1501 from MarcSabatella/40556-focus-duration

fix #40556: focus lost after duration change