X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/1aaa2260767069a2265ceefd73f55e8270c84a1f..a4f5747875aa0fb598e69d2200ef431c2fb7f1e9:/src/redakcja/static/js/wiki/view_editor_wysiwyg.js diff --git a/src/redakcja/static/js/wiki/view_editor_wysiwyg.js b/src/redakcja/static/js/wiki/view_editor_wysiwyg.js index 7b4069cd..7baa00da 100644 --- a/src/redakcja/static/js/wiki/view_editor_wysiwyg.js +++ b/src/redakcja/static/js/wiki/view_editor_wysiwyg.js @@ -727,14 +727,6 @@ 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){ @@ -784,7 +776,7 @@ let selection = window.getSelection(); var n = selection.rangeCount; - if (n != 1) { + if (n != 1 || selection.isCollapsed) { window.alert("Nie zaznaczono obszaru"); return false }