Make the entire User Info scrollable, sticky close button

This commit is contained in:
Michael Telatynski 2020-01-23 16:09:32 +00:00
parent d7a4698db8
commit 237a0ed071
2 changed files with 43 additions and 36 deletions

View file

@ -23,15 +23,23 @@ limitations under the License.
font-size: 12px;
.mx_UserInfo_cancel {
cursor: pointer;
position: absolute;
top: 0;
border-radius: 4px;
background-color: $dark-panel-bg-color;
margin: 9px;
z-index: 1; // render on top of the right panel
div {
height: 16px;
width: 16px;
padding: 10px 0 10px 10px;
cursor: pointer;
padding: 4px;
mask-image: url('$(res)/img/minimise.svg');
mask-repeat: no-repeat;
mask-position: 16px center;
mask-position: 7px center;
background-color: $rightpanel-button-color;
position: absolute;
}
}
h2 {

View file

@ -1219,10 +1219,9 @@ const UserInfo = ({user, groupId, roomId, onClose}) => {
let closeButton;
if (onClose) {
closeButton = <AccessibleButton
className="mx_UserInfo_cancel"
onClick={onClose}
title={_t('Close')} />;
closeButton = <AccessibleButton className="mx_UserInfo_cancel" onClick={onClose} title={_t('Close')}>
<div />
</AccessibleButton>;
}
const memberDetails = (
@ -1338,6 +1337,7 @@ const UserInfo = ({user, groupId, roomId, onClose}) => {
return (
<div className="mx_UserInfo" role="tabpanel">
<AutoHideScrollbar className="mx_UserInfo_scrollContainer">
{ closeButton }
{ avatarElement }
@ -1363,7 +1363,6 @@ const UserInfo = ({user, groupId, roomId, onClose}) => {
</div>
</div> }
<AutoHideScrollbar className="mx_UserInfo_scrollContainer">
{ securitySection }
<UserOptionsSection
devices={devices}