From 5296b7a70782d05aa87f7efa5e0a4f1043fb6066 Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Thu, 16 Nov 2017 18:42:10 +0100 Subject: [PATCH] Fix failing test in Safari. --- tests/plugins/imagebase/features/caption.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/plugins/imagebase/features/caption.js b/tests/plugins/imagebase/features/caption.js index 7a00d2b9250..17b9a678f87 100644 --- a/tests/plugins/imagebase/features/caption.js +++ b/tests/plugins/imagebase/features/caption.js @@ -125,7 +125,13 @@ } function fillInCaption( widget, content ) { + var range = widget.editor.createRange(); + + range.setStart( widget.parts.caption.getChild( 0 ), 1 ); + range.collapse(); + range.select(); widget.parts.caption.focus(); + widget.editables.caption.setData( content ); }