Document preview doesn't process UI controls while loading

Continuation of #3336