Fix scroll jumping in Firefox when pasting at end of line

Change-Id: Ia230e9b866bf8dccd74f06e4fc6d38bd8caddf3f
Merge "Fix scroll jumping in Firefox when pasting at end of line"