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 = $('textarea', qr.el);
|
||||||
ta.value = ta.value.slice(0, ta.selectionStart) + text + ta.value.slice(ta.selectionEnd, ta.value.length);
|
ta.value = ta.value.slice(0, ta.selectionStart) + text + ta.value.slice(ta.selectionEnd, ta.value.length);
|
||||||
ta.focus();
|
ta.focus();
|
||||||
ta.selectionEnd = ta.selectionStart + text.length;
|
return ta.selectionStart = ta.selectionEnd = ta.selectionStart + text.length;
|
||||||
return window.getSelection().collapseToEnd();
|
|
||||||
},
|
},
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
var m, newFile, oldFile, _ref;
|
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.value = ta.value.slice(0, ta.selectionStart) + text + ta.value.slice(ta.selectionEnd, ta.value.length)
|
||||||
ta.focus()
|
ta.focus()
|
||||||
#move the caret to the end of the new quote
|
#move the caret to the end of the new quote
|
||||||
ta.selectionEnd = ta.selectionStart + text.length
|
ta.selectionStart = ta.selectionEnd = ta.selectionStart + text.length
|
||||||
window.getSelection().collapseToEnd()
|
|
||||||
|
|
||||||
refresh: ->
|
refresh: ->
|
||||||
$('[name=sub]', qr.el).value = ''
|
$('[name=sub]', qr.el).value = ''
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user