document selection changed event