Fixed a bug that the cursor doesn't move after expanding without preview.