TDI-30442:change the default selection style and improve some code.