Shave a line, fix firefox leaving the text selected when quoting opens the QR. (wtf?)
This commit is contained in:
parent
667cb36461
commit
ccad16264d
@ -1667,8 +1667,7 @@
|
||||
ta = $('textarea', qr.el);
|
||||
ta.value = ta.value.slice(0, ta.selectionStart) + text + ta.value.slice(ta.selectionEnd, ta.value.length);
|
||||
ta.focus();
|
||||
ta.selectionEnd = ta.selectionStart + text.length;
|
||||
return window.getSelection().collapseToEnd();
|
||||
return ta.selectionStart = ta.selectionEnd = ta.selectionStart + text.length;
|
||||
},
|
||||
refresh: function() {
|
||||
var m, newFile, oldFile, _ref;
|
||||
|
||||
@ -1305,8 +1305,7 @@ qr =
|
||||
ta.value = ta.value.slice(0, ta.selectionStart) + text + ta.value.slice(ta.selectionEnd, ta.value.length)
|
||||
ta.focus()
|
||||
#move the caret to the end of the new quote
|
||||
ta.selectionEnd = ta.selectionStart + text.length
|
||||
window.getSelection().collapseToEnd()
|
||||
ta.selectionStart = ta.selectionEnd = ta.selectionStart + text.length
|
||||
|
||||
refresh: ->
|
||||
$('[name=sub]', qr.el).value = ''
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user