Fixes +9964 - Don't show urls while editor is not focussed

pull/223/head
Ruben Daniels 2015-11-12 19:46:32 +00:00
rodzic ac1f51af7e
commit ff93a89502
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -100,6 +100,9 @@ var HoverLink = function(editor) {
};
this.onClick = function(e) {
if (!this.editor.isFocused())
return;
if (this.link && this.isOpen) { // && this.link.isFocused
if (this.editor.selection.isEmpty()) {
this.editor.selection.setSelectionRange(this.range);
@ -378,7 +381,7 @@ var HoverLink = function(editor) {
};
this.onMouseMove = function(e) {
if (e.shiftKey || e.ctrlKey || e.metaKey)
if (e.shiftKey || e.ctrlKey || e.metaKey || !this.editor.isFocused())
return this.clear();
if (this.editor.$mouseHandler.isMousePressed) {