Merge pull request #20939 from nullaus/bug1027414

bug 1027414 - Dismiss on visibilitychange r=alive (on behalf of 21)
(cherry picked from commit 217b6fac31a8eaa1f74dfff95239fbc29eae4dd4)
Merge pull request #20956 from nullaus/v2.0

Merge pull request #20939 from nullaus/bug1027414
Merge pull request #20750 from RudyLu/keyboard/Bug1015541

Bug 1015541 - choosing a word suggestion after moving the caret changes the wrong text
r=janjongboom
(cherry picked from commit 73b9c780c54ec1c6fcf47c2ce467672d3c5aaded)
a=1.4+