Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4395)

Unified Diff: chrome/renderer/resources/offline.js

Issue 1116693003: Interstitial page bug fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/security_warnings/interstitial_v2_mobile.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/offline.js
diff --git a/chrome/renderer/resources/offline.js b/chrome/renderer/resources/offline.js
index 5e6c6b348615f8a02f15c4ff5dc4807bf016a6b9..34e522da8bb93a12ee6c23febdf558828d8e559f 100644
--- a/chrome/renderer/resources/offline.js
+++ b/chrome/renderer/resources/offline.js
@@ -695,8 +695,8 @@ Runner.prototype = {
* @return {boolean}
*/
isLeftClickOnCanvas: function(e) {
- return e.button && e.button < 2 && e.type == Runner.events.MOUSEUP &&
- e.target == this.canvas;
+ return e.button != null && e.button < 2 &&
+ e.type == Runner.events.MOUSEUP && e.target == this.canvas;
},
edwardjung 2015/04/30 10:27:00 e.button primary button click returns 0, so it fai
/**
@@ -793,7 +793,8 @@ Runner.prototype = {
onVisibilityChange: function(e) {
if (document.hidden || document.webkitHidden || e.type == 'blur') {
this.stop();
- } else {
+ } else if (!this.crashed) {
+ this.tRex.reset();
edwardjung 2015/04/30 10:27:00 Reset the jump if window is refocused.
this.play();
}
},
« no previous file with comments | « chrome/browser/resources/security_warnings/interstitial_v2_mobile.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698