Fossil SCM

Read the CSS transition style to be restored later directly from the (previously initialized) style property, as window.getComputedStyle() seems to return null with Firefox, in this specific case. This fixes a problem introduced with the previous check-in.

florian 2018-10-11 16:36 UTC js-hamburger-menu
Commit c6735b38b48b5546ca20c50df3ee97bde07762f5
1 file changed +1 -1
--- skins/default/js.txt
+++ skins/default/js.txt
@@ -119,11 +119,11 @@
119119
document.onkeydown = originalEventHandlers.onkeydown;
120120
document.onclick = originalEventHandlers.onclick;
121121
// Transition back to hidden state.
122122
if (animate) {
123123
if (suppressAnimation) {
124
- var transition = window.getComputedStyle(panel).transition;
124
+ var transition = panel.style.transition;
125125
panel.style.transition = '';
126126
panel.style.maxHeight = '0';
127127
panel.style.border = 'none';
128128
setTimeout(function() {
129129
// Make sure CSS transition won't take effect now, so restore it
130130
--- skins/default/js.txt
+++ skins/default/js.txt
@@ -119,11 +119,11 @@
119 document.onkeydown = originalEventHandlers.onkeydown;
120 document.onclick = originalEventHandlers.onclick;
121 // Transition back to hidden state.
122 if (animate) {
123 if (suppressAnimation) {
124 var transition = window.getComputedStyle(panel).transition;
125 panel.style.transition = '';
126 panel.style.maxHeight = '0';
127 panel.style.border = 'none';
128 setTimeout(function() {
129 // Make sure CSS transition won't take effect now, so restore it
130
--- skins/default/js.txt
+++ skins/default/js.txt
@@ -119,11 +119,11 @@
119 document.onkeydown = originalEventHandlers.onkeydown;
120 document.onclick = originalEventHandlers.onclick;
121 // Transition back to hidden state.
122 if (animate) {
123 if (suppressAnimation) {
124 var transition = panel.style.transition;
125 panel.style.transition = '';
126 panel.style.maxHeight = '0';
127 panel.style.border = 'none';
128 setTimeout(function() {
129 // Make sure CSS transition won't take effect now, so restore it
130

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button