[#2790] Only prevent default keystrokes on dialog if we're not focused o...

...n a keyboard avoid element.