From 1b88bcf6c02383b99bc136ad114588fcf0666660 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Fri, 22 Mar 2013 09:32:53 +0100 Subject: [PATCH] Fixes #1542 --- redakcja/static/js/wiki/view_editor_wysiwyg.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/redakcja/static/js/wiki/view_editor_wysiwyg.js b/redakcja/static/js/wiki/view_editor_wysiwyg.js index 01deb58f..da69d3eb 100644 --- a/redakcja/static/js/wiki/view_editor_wysiwyg.js +++ b/redakcja/static/js/wiki/view_editor_wysiwyg.js @@ -618,7 +618,16 @@ xml2html({ xml: this.doc.text, success: function(element){ - $('#html-view').html(element); + var htmlView = $('#html-view'); + htmlView.html(element); + htmlView.find('*[x-node]').dblclick(function(e) { + if($(e.target).is('textarea')) + return; + var selection = window.getSelection(); + selection.collapseToStart(); + selection.modify('extend', 'forward', 'word'); + e.stopPropagation(); + }); _finalize(success); }, error: function(text, source){ -- 2.20.1