This commit is contained in:
Nicolas Stepien 2013-04-14 02:40:35 +02:00
parent 40582724e1
commit e4b195734a
2 changed files with 10 additions and 8 deletions

View File

@ -1,3 +1,5 @@
- Fix regression concerning thread selection when quoting on the index.
### 3.0.5 - *2013-04-14* ### 3.0.5 - *2013-04-14*
- `Scroll to Last Read Post` is now optional, enabled by default. - `Scroll to Last Read Post` is now optional, enabled by default.

View File

@ -264,19 +264,19 @@ QR =
text += ">#{s}\n" text += ">#{s}\n"
QR.open() QR.open()
ta = QR.nodes.com {com, thread} = QR.nodes
QR.nodes.thread.value = OP.ID unless ta.value thread.value = OP.ID unless com.value
caretPos = ta.selectionStart caretPos = com.selectionStart
# Replace selection for text. # Replace selection for text.
ta.value = ta.value[...caretPos] + text + ta.value[ta.selectionEnd..] com.value = com.value[...caretPos] + text + com.value[com.selectionEnd..]
# Move the caret to the end of the new quote. # Move the caret to the end of the new quote.
range = caretPos + text.length range = caretPos + text.length
ta.setSelectionRange range, range com.setSelectionRange range, range
ta.focus() com.focus()
# Fire the 'input' event QR.selected.save com
$.event 'input', null, ta QR.selected.save thread
characterCount: -> characterCount: ->
counter = QR.nodes.charCount counter = QR.nodes.charCount