Skip to content

Commit caa2fd9

Browse files
committed
sacrifice dead goats to make gemini-scrollbars work on firefox 42 and chrome 48 and later. the problem is that flexbox interacts badly with gemini-scrollbars, as gemini looks at the offsetWidth of the container in order to make the width of its enclosed scrollable view = width+scrollbarwidth. The problem is that flexbox then sees that the scrollable view has expanded, and unhelpfully flexes the container to fit it. This fixes the problem by providing more explicit widths for the containers to stop them flexing. I'm not sure I want to know why we don't also see the same problem with heights.
1 parent e0efb68 commit caa2fd9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/skins/vector/css/organisms/RoomView.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@ limitations under the License.
107107

108108
width: 100%;
109109

110+
/* specify width and margin in here rather than the wrapper otherwise gemini-scrollbars gets confused */
111+
max-width: 960px;
112+
margin: auto;
113+
110114
overflow-y: auto;
111115
}
112116

113117
.mx_RoomView_messageListWrapper {
114-
max-width: 960px;
115-
margin: auto;
116118
}
117119

118120
.mx_RoomView_MessageList {

src/skins/vector/css/pages/MatrixChat.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,14 @@ limitations under the License.
7171

7272
background-color: #eaf5f0;
7373

74+
/*
75+
We can't use flex here as gemini-scrollbars chokes on the width calculation (on FF 42 and Chrome 48)
76+
and you end up with double-scrollbars and an ever-increasing width.
77+
7478
-webkit-flex: 0 0 210px;
7579
flex: 0 0 210px;
80+
*/
81+
width: 210px;
7682
}
7783

7884
.mx_MatrixChat .mx_LeftPanel.collapsed {
@@ -117,8 +123,12 @@ limitations under the License.
117123
-webkit-order: 3;
118124
order: 3;
119125

126+
/* Similarly, specify width explicitly otherwise gemini-scrollbars gets confused
127+
120128
-webkit-flex: 0 0 235px;
121129
flex: 0 0 235px;
130+
*/
131+
width: 235px;
122132
}
123133

124134
.mx_MatrixChat .mx_RightPanel.collapsed {

0 commit comments

Comments
 (0)