fix autofocus for lazy loaded views

also unified formatting