Updated selection of text when opening sort

This commit is contained in:
xevidos 2019-11-17 22:42:48 -05:00
parent 2e6367e459
commit 167cd673a7
1 changed files with 16 additions and 2 deletions

View File

@ -1566,9 +1566,23 @@
openSort: function() {
if( this.getActive() && codiad.active.getSelectedText() != "" ) {
let selected = codiad.active.getSelectedText();
if( this.getActive() && selected != "" ) {
codiad.modal.load( 400, 'components/editor/dialog.php?action=sort' );
codiad.modal.load(
400,
'components/editor/dialog.php?action=sort'
{},
function( c ) {
let textarea = c.find( 'textarea:first' );
textarea.val( selected )
textarea.focus();
codiad.modal.hideOverlay();
}
);
codiad.modal.hideOverlay();
} else {