Move initial cursor place to the end for @mention reply (#375)
This commit is contained in:
parent
c5c0e2bfe5
commit
b5b4a8ac5d
|
@ -60,6 +60,11 @@ class Compose(FormView):
|
||||||
self.fields["text"].widget.attrs[
|
self.fields["text"].widget.attrs[
|
||||||
"_"
|
"_"
|
||||||
] = f"""
|
] = f"""
|
||||||
|
init
|
||||||
|
-- Move cursor to the end of existing text
|
||||||
|
set my.selectionStart to my.value.length
|
||||||
|
end
|
||||||
|
|
||||||
on load or input
|
on load or input
|
||||||
-- Unicode-aware counting to match Python
|
-- Unicode-aware counting to match Python
|
||||||
set characters to Array.from(my.value.trim()).length
|
set characters to Array.from(my.value.trim()).length
|
||||||
|
|
Loading…
Reference in New Issue