Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Commit

Permalink
no frame focus if url unchanged
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-sap committed Jan 17, 2017
1 parent cc0f9fb commit ba5c13d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions app/addressbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ function onUrlChanged (webview, issue) {
lastShortUrl = shortenUrl(lastFullUrl);
el[0].value = lastShortUrl;

console.log(lastFullUrl, lastShortUrl);

if (issue && issue.id) {
starBox.removeClass('disabled');
starsDB.getById(issue.id).then(res => {
Expand Down
6 changes: 4 additions & 2 deletions app/frame/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const wpcss = `${__dirname}/webview.css`;

const ses = session.fromPartition('persist:github');

let webview, isReady = false;
let webview, isReady = false, lastUrl = '';

const webviewHandlers = {
documentClicked () { $.trigger('document-clicked'); },
Expand Down Expand Up @@ -91,9 +91,11 @@ function loadingStart () {
}

function loadingStop () {
const newUrl = webview[0].getURL();
webview.removeClass('loading');
$.trigger('url-change-end');
webview[0].focus();
if (lastUrl !== newUrl) webview[0].focus();
lastUrl = newUrl;
}


Expand Down

0 comments on commit ba5c13d

Please sign in to comment.