Fixes to selection handling in Firefox.
Fixes to selection handling in Firefox.

lddubeau/wed,lddubeau/wed,mangalam-research/wed,mangalam-research/wed,slattery/wed,mangalam-research/wed,slattery/wed,slattery/wed,mangalam-research/wed,lddubeau/wed,lddubeau/wed