Commit b18cd2fd76ea90211edf125a9db775b264cd0b66
revert scrollIntoView ... change
mix irving committed on 12/19/2017, 6:00:11 AMParent: 3ca54bcd8a9335fba6f95f70e937ec310c5b7ad9
Files changed
app/sync/catch-keyboard-shortcut.js | changed |
app/sync/catch-keyboard-shortcut.js | ||
---|---|---|
@@ -118,14 +118,16 @@ | ||
118 | 118 … | function locateKey () { |
119 | 119 … | const msg = tabs.currentPage().querySelector(`[data-id='${id}']`) |
120 | 120 … | if (msg === null) return setTimeout(locateKey, 100) |
121 | 121 … | |
122 | - msg.scrollIntoView({ | |
123 | - behavior: 'smooth', | |
124 | - block: 'start', | |
125 | - inline: 'start', | |
126 | - }) | |
127 | - // ;(msg.scrollIntoViewIfNeeded || msg.scrollIntoView).call(msg) | |
122 … | + if (msg.scrollIntoViewIfNeeded) | |
123 … | + msg.scrollIntoViewIfNeeded(false) | |
124 … | + else | |
125 … | + msg.scrollIntoView({ | |
126 … | + behavior: 'smooth', | |
127 … | + block: 'start', | |
128 … | + inline: 'start', | |
129 … | + }) | |
128 | 130 … | msg.focus() |
129 | 131 … | } |
130 | 132 … | } |
131 | 133 … |
Built with git-ssb-web