mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 04:19:05 +08:00
16 lines
390 B
JavaScript
16 lines
390 B
JavaScript
Ember.Test.registerHelper("setTextareaSelection", function(
|
|
app,
|
|
textarea,
|
|
selectionStart,
|
|
selectionEnd
|
|
) {
|
|
textarea.selectionStart = selectionStart;
|
|
textarea.selectionEnd = selectionEnd;
|
|
});
|
|
|
|
Ember.Test.registerHelper("getTextareaSelection", function(app, textarea) {
|
|
var start = textarea.selectionStart;
|
|
var end = textarea.selectionEnd;
|
|
return [start, end - start];
|
|
});
|