Skip to content

Commit

Permalink
Adding paste event to LinkDialog
Browse files Browse the repository at this point in the history
When user paste url, link text is changing but button is still disabled.
Adding paste event fixing it
  • Loading branch information
dany28 committed May 31, 2016
1 parent ad3e57f commit 50a4e6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/bs3/module/LinkDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ define([

$linkText.val(linkInfo.text);

$linkText.on('input', function () {
$linkText.on('input paste', function () {
ui.toggleBtn($linkBtn, $linkText.val() && $linkUrl.val());
// if linktext was modified by keyup,
// stop cloning text from linkUrl
linkInfo.text = $linkText.val();
});

$linkUrl.on('input', function () {
$linkUrl.on('input paste', function () {
ui.toggleBtn($linkBtn, $linkText.val() && $linkUrl.val());
// display same link on `Text to display` input
// when create a new link
Expand Down

0 comments on commit 50a4e6b

Please sign in to comment.