correct bug by changing mode before scrolling
fix bug: remember content of block before showing edit