Fix few bugs in UI

1. make selection to be selected and edited;
2. fix textarea bugs