Don't resize window for modal bar until after query text is set

This is for #8254 (issue number in branch name is incorrect).