X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/1aaa2260767069a2265ceefd73f55e8270c84a1f..7a959df9b6d26bfc4688a0b0096a23e019eaf9ac:/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 }