Last modified: 2014-06-24 17:22:57 UTC
After calling encapsulateSelection (pre = "<tag>", post = "</tag>") on "sometext" we have "<tag>sometext</tag><caret here>" instead of "<tag>sometext<caret here></tag>" Is this a bug? At this moment I need to run smth. like this <source lang="javascript">if (endTag && (sel !== ''))//sel - selection before encapsulateSelection call { var pos = $(textarea).textSelection('getCaretPosition'); $(textarea).textSelection('setSelection', {start: pos - endTag.length}); }</source>
Hi Pustomytnyk! Sorry that nobody has taken a look at this report yet and given feedback. :( Which browser(s) does this happen with? Any testcase somewhere available, in case this is still a problem in a recent MediaWiki version or on a Wikimedia website, if you know?