Commit a63b8f8aceec2f9582efb7ddd51e11e58515dd66
trying to guess what might make tabs not reopen pages on mobile chrome
Dominic Tarr committed on 7/10/2016, 3:48:06 AMParent: f8122ec333c7c980419eb8a3fe0af6a6a78333ba
Files changed
modules/tabs.js | changed |
modules/tabs.js | ||
---|---|---|
@@ -75,10 +75,10 @@ | ||
75 | 75 | var link = ancestor(ev.target) |
76 | 76 | if(!link) return |
77 | 77 | var path = link.hash.substring(1) |
78 | 78 | |
79 | + ev.preventDefault() | |
79 | 80 | ev.stopPropagation() |
80 | - ev.preventDefault() | |
81 | 81 | |
82 | 82 | //open external links. |
83 | 83 | //this ought to be made into something more runcible |
84 | 84 | if(/^https?/.test(link.href)) return openExternal(link.href) |
@@ -90,8 +90,10 @@ | ||
90 | 90 | el.scroll = keyscroll(el.querySelector('.scroller__content')) |
91 | 91 | tabs.add(path, el, !ev.ctrlKey) |
92 | 92 | localStorage.openTabs = JSON.stringify(tabs.tabs) |
93 | 93 | } |
94 | + | |
95 | + return false | |
94 | 96 | } |
95 | 97 | |
96 | 98 | window.addEventListener('keydown', function (ev) { |
97 | 99 | if (ev.target.nodeName === 'INPUT' || ev.target.nodeName === 'TEXTAREA') |
@@ -164,4 +166,5 @@ | ||
164 | 166 | return tabs |
165 | 167 | } |
166 | 168 | |
167 | 169 | |
170 | + |
Built with git-ssb-web