avoid spurious failure on chrome where italic button is checked,
and stop using internal editor method to position caret, refs #9460
(cherry picked from commit f130c59e937bf9e71e4fe10f161972d9c1bb3dfd)

(cherry picked from commit 513200647599abb14740c5faa912737cc3192fc4)