Fixed caret position in ToggleButton after changes have been made.