correct cursor location after entering div