Skip to content

Commit

Permalink
Removed .on() event for recent urls; this is handled inside of toolba…
Browse files Browse the repository at this point in the history
…r.js now
  • Loading branch information
nwittwer committed Oct 3, 2018
1 parent 3e789f2 commit 0440eda
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/js/features/toolbar/toolbar-recent-urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,11 @@ app.toolbar.recentURLs = {
app.toolbar.recentURLs.show();

// Listen for clicks on the dropdown items
$(".toolbar__url-li").on('click', function(e) {
$("#toolbar__url").val( $(e.target).text() );
$(".toolbar__url-li").on('click', function (e) {
$("#toolbar__url").val($(e.target).text());
app.toolbar.updateURL();
});

// Add to LocalStorage on submit
$("#toolbar__url").on('submit keypress', function (e) {
// On enter key press
if (e.which == 13) {
app.toolbar.recentURLs.add(e);
} else if (e.type == "submit") {
app.toolbar.recentURLs.add(e);
}
});

// When clicking the search, show recent sites
$("#toolbar__url").on('click blur', function (e) {
if (e.type == "click") {
Expand Down

0 comments on commit 0440eda

Please sign in to comment.