Two buttons as a row in popup
Fix hiding scroll down button while jumping
This commit is contained in:
parent
0c8e5e21e7
commit
10fbde2bc7
@ -889,7 +889,7 @@ export default class ChatBubbles {
|
|||||||
}, 1350);
|
}, 1350);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.scrollable.isScrolledDown) {
|
if(this.scrollable.isScrolledDown && this.scrolledAllDown) {
|
||||||
this.bubblesContainer.classList.add('scrolled-down');
|
this.bubblesContainer.classList.add('scrolled-down');
|
||||||
this.scrolledDown = true;
|
this.scrolledDown = true;
|
||||||
} else if(this.bubblesContainer.classList.contains('scrolled-down')) {
|
} else if(this.bubblesContainer.classList.contains('scrolled-down')) {
|
||||||
|
@ -66,6 +66,10 @@ export default class PopupElement {
|
|||||||
const buttonsDiv = document.createElement('div');
|
const buttonsDiv = document.createElement('div');
|
||||||
buttonsDiv.classList.add('popup-buttons');
|
buttonsDiv.classList.add('popup-buttons');
|
||||||
|
|
||||||
|
if(buttons.length === 2) {
|
||||||
|
buttonsDiv.classList.add('popup-buttons-row');
|
||||||
|
}
|
||||||
|
|
||||||
const buttonsElements = buttons.map(b => {
|
const buttonsElements = buttons.map(b => {
|
||||||
const button = document.createElement('button');
|
const button = document.createElement('button');
|
||||||
button.className = 'btn' + (b.isDanger ? ' danger' : '');
|
button.className = 'btn' + (b.isDanger ? ' danger' : '');
|
||||||
|
@ -99,6 +99,18 @@
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
|
||||||
|
&-row {
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
& + .btn {
|
||||||
|
margin-top: 0 !important;
|
||||||
|
margin-right: .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
background: none;
|
background: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user