cancel button works and auto-select text on focus