Bug 961703 Commit or cancel composition when text/selection/focus is changed during composition for avoiding making some TIPs confused r=m_kato