fixed issue on IE: selecting flag puts cursor at beginning