Last modified: 2014-06-24 17:22:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42261, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40261 - encapsulateSelection don't return caret to prev. position after wrapping selected text
encapsulateSelection don't return caret to prev. position after wrapping sele...
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-15 04:33 UTC by Pustomytnyk
Modified: 2014-06-24 17:22 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Pustomytnyk 2012-09-15 04:33:45 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>
Comment 1 Andre Klapper 2014-06-24 17:22:57 UTC
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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links