Make the :last-child
selector more specific
otherwise deeper leaf-nodes get returned
This commit is contained in:
parent
49addedd1f
commit
3cf7fefaa8
@ -1827,7 +1827,7 @@
|
||||
displayJoinNotification (stanza) {
|
||||
const nick = Strophe.getResourceFromJid(stanza.getAttribute('from'));
|
||||
const stat = stanza.querySelector('status');
|
||||
const last_el = this.content.querySelector(':last-child');
|
||||
const last_el = this.content.querySelector('.message:last-child');
|
||||
if (_.includes(_.get(last_el, 'classList', []), 'chat-info') &&
|
||||
_.get(last_el, 'dataset', {}).leave === `"${nick}"`) {
|
||||
last_el.outerHTML =
|
||||
|
@ -1 +1 @@
|
||||
<div class="chat-info" {{{o.data}}}>{{{o.message}}}</div>
|
||||
<div class="message chat-info" {{{o.data}}}>{{{o.message}}}</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="chat-message {{{o.extra_classes}}}" data-isodate="{{{o.isodate}}}" data-msgid="{{{o.msgid}}}">
|
||||
<div class="message chat-message {{{o.extra_classes}}}" data-isodate="{{{o.isodate}}}" data-msgid="{{{o.msgid}}}">
|
||||
<span class="chat-msg-author chat-msg-{{{o.sender}}}">{{{o.time}}} {{{o.username}}}: </span>
|
||||
<span class="chat-msg-content"><!-- message gets added here via renderMessage --></span>
|
||||
</div>
|
||||
|
@ -169,7 +169,7 @@
|
||||
return _.includes(el.classList, className);
|
||||
};
|
||||
|
||||
u.slideOut = function (el, duration=250) {
|
||||
u.slideOut = function (el, duration=200) {
|
||||
/* Shows/expands an element by sliding it out of itself
|
||||
*
|
||||
* Parameters:
|
||||
@ -233,7 +233,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
u.slideIn = function (el, duration=250) {
|
||||
u.slideIn = function (el, duration=200) {
|
||||
/* Hides/collapses an element by sliding it into itself. */
|
||||
return new Promise((resolve, reject) => {
|
||||
if (_.isNil(el)) {
|
||||
|
Loading…
Reference in New Issue
Block a user