Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add a previous event safe area around action bar
Browse files Browse the repository at this point in the history
This adds a previous event safe area so that you can't accidentally hover the
previous event while trying to mouse into the action bar or from the react
button to its tooltip.

Part of element-hq/element-web#10185
Fixes element-hq/element-web#9650
  • Loading branch information
jryans committed Jul 17, 2019
1 parent 0089034 commit 2be9696
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions res/css/views/messages/_MessageActionBar.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright 2019 New Vector Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,6 +30,22 @@ limitations under the License.
// Ensure the action bar appears above over things, like the read marker.
z-index: 1;

// Adds a previous event safe area so that you can't accidentally hover the
// previous event while trying to mouse into the action bar or from the
// react button to its tooltip.
&::before {
content: '';
position: absolute;
// tooltip overhang + action bar + action bar offset from event
width: calc(48px + 100% + 8px);
// safe area + action bar
height: calc(20px + 100%);
top: -20px;
left: -48px;
z-index: -1;
cursor: initial;
}

> * {
white-space: nowrap;
display: inline-block;
Expand Down

0 comments on commit 2be9696

Please sign in to comment.