Skip to content

Commit

Permalink
Fix bug where a long subject title could not be displayed in some cas…
Browse files Browse the repository at this point in the history
…es (#9416)
  • Loading branch information
alecpl committed Jul 27, 2024
1 parent 9d9f4d6 commit f6c92eb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Fix invalid line break characters in multi-line text in Sieve scripts (#9543)
- Fix bug where "with attachment" filter could fail on some fts engines (#9514)
- Fix bug where an unhandled exception was caused by an invalid image attachment (#9475)
- Fix bug where a long subject title could not be displayed in some cases (#9416)

## Release 1.6.7

Expand Down
28 changes: 21 additions & 7 deletions program/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3280,7 +3280,14 @@ function rcube_webmail()
if (!mbox || (mbox == this.env.mailbox && !this.is_multifolder_listing()))
return;

<<<<<<< HEAD
var lock = false, post_data = this.selection_post_data({_target_mbox: mbox, _uid: uids});
=======
query[uid_param] = uid;
cols.subject = '<a href="' + this.url(action, query) + '" onclick="return rcube_event.keyboard_only(event)"'
+ ' onmouseover="rcube_webmail.long_subject_title(this)" tabindex="-1"><span>' + cols.subject + '</span></a>';
}
>>>>>>> fdeb13727... Fix bug where a long subject title could not be displayed in some cases (#9416)

This comment has been minimized.

Copy link
@chilek

chilek Jul 30, 2024

Contributor

This unresolved change conflict makes installation unusable?

This comment has been minimized.

Copy link
@alecpl

alecpl Jul 30, 2024

Author Member

Fixed in c9702be. Thanks.

// exit if selection is empty
if (!post_data._uid)
Expand Down Expand Up @@ -10169,13 +10176,20 @@ function rcube_webmail()


// some static methods
rcube_webmail.long_subject_title = function(elem, indent, text_elem)
{
if (!elem.title) {
var $elem = $(text_elem || elem);
if ($elem.width() + (indent || 0) * 15 > $elem.parent().width())
elem.title = rcube_webmail.subject_text($elem[0]);
}
rcube_webmail.long_subject_title = function (elem, indent, text_elem) {
if (!elem.title) {
var siblings_width = 0, $elem = $(text_elem || elem);

$elem.siblings().each(function () {
// Note: width() returns 0 for elements with icons in :before (Elastic)
siblings_width += $(this).width() + (parseFloat(window.getComputedStyle(this, ':before').width) || 0);
});

// Note: 3px to be on the safe side, but also specifically for Elastic
if ($elem.width() + siblings_width + (indent || 0) * 15 >= $elem.parent().width() - 3) {
elem.title = rcube_webmail.subject_text($elem[0]);
}
}
};

rcube_webmail.long_subject_title_ex = function(elem)
Expand Down

0 comments on commit f6c92eb

Please sign in to comment.