Skip to content

Commit

Permalink
Merge branch 'MDL-72223' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve committed Aug 30, 2021
2 parents 483bc93 + 2661214 commit a926f52
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Expand Up @@ -203,7 +203,7 @@ Y.namespace('M.atto_link').Button = Y.Base.create('button', Y.M.editor_atto.Edit
}
} else {
// User is selecting some text before clicking on the Link button.
textToDisplay = Y.one(selectednode).get('textContent');
textToDisplay = window.getSelection().toString();
if (textToDisplay !== '') {
this._hasTextToDisplay = true;
this._content.one(SELECTORS.URLTEXT).set('value', textToDisplay);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -203,7 +203,7 @@ Y.namespace('M.atto_link').Button = Y.Base.create('button', Y.M.editor_atto.Edit
}
} else {
// User is selecting some text before clicking on the Link button.
textToDisplay = Y.one(selectednode).get('textContent');
textToDisplay = window.getSelection().toString();
if (textToDisplay !== '') {
this._hasTextToDisplay = true;
this._content.one(SELECTORS.URLTEXT).set('value', textToDisplay);
Expand Down
2 changes: 1 addition & 1 deletion lib/editor/atto/plugins/link/yui/src/button/js/button.js
Expand Up @@ -201,7 +201,7 @@ Y.namespace('M.atto_link').Button = Y.Base.create('button', Y.M.editor_atto.Edit
}
} else {
// User is selecting some text before clicking on the Link button.
textToDisplay = Y.one(selectednode).get('textContent');
textToDisplay = window.getSelection().toString();
if (textToDisplay !== '') {
this._hasTextToDisplay = true;
this._content.one(SELECTORS.URLTEXT).set('value', textToDisplay);
Expand Down

0 comments on commit a926f52

Please sign in to comment.