https://bugzilla.wikimedia.org/show_bug.cgi?id=40261

       Web browser: ---
             Bug #: 40261
           Summary: encapsulateSelection don't return caret to prev.
                    position after wrapping selected text
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: JavaScript
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


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>

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to