mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-22 13:53:14 +08:00
Fix strange quoting behaviour (#1225)
This commit is contained in:
parent
aecb0b2500
commit
ca4897038a
3 changed files with 26 additions and 3 deletions
|
@ -21,6 +21,9 @@ export const $body = $('body');
|
|||
|
||||
export const $div = $('<div></div>');
|
||||
|
||||
export const $hcont = $('<div></div>');
|
||||
$hcont.attr('area', 'hidden').css({position: 'absolute', left: -5000}).appendTo($body);
|
||||
|
||||
export const startMicrotime = (new window.Date()).getTime();
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,7 @@ import _ from '_';
|
|||
import ko from 'ko';
|
||||
import Autolinker from 'Autolinker';
|
||||
|
||||
import {$win, $div, dropdownVisibility, data as GlobalsData} from 'Common/Globals';
|
||||
import {$win, $div, $hcont, dropdownVisibility, data as GlobalsData} from 'Common/Globals';
|
||||
import {ComposeType, EventKeyCode, SaveSettingsStep, FolderType} from 'Common/Enums';
|
||||
import {Mime} from 'Common/Mime';
|
||||
import {jassl} from 'Common/Jassl';
|
||||
|
@ -1450,6 +1450,18 @@ export function mimeContentType(fileName)
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Object} $el
|
||||
* @returns {number}
|
||||
*/
|
||||
export function getRealHeight($el)
|
||||
{
|
||||
$el.clone().show().appendTo($hcont);
|
||||
const result = $hcont.height();
|
||||
$hcont.empty();
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @param {number} value
|
||||
|
|
|
@ -14,7 +14,8 @@ import {
|
|||
import {
|
||||
trim, isNormal, isArray, inArray,
|
||||
pInt, pString, plainToHtml,
|
||||
windowResize, findEmailAndLinks
|
||||
windowResize, findEmailAndLinks,
|
||||
getRealHeight
|
||||
} from 'Common/Utils';
|
||||
|
||||
import {
|
||||
|
@ -459,7 +460,14 @@ class MessageUserStore
|
|||
{
|
||||
$oList.each(function() {
|
||||
const $this = $(this); // eslint-disable-line no-invalid-this
|
||||
if ('' !== trim($this.text()))
|
||||
|
||||
let h = $this.height();
|
||||
if (0 === h)
|
||||
{
|
||||
h = getRealHeight($this);
|
||||
}
|
||||
|
||||
if ('' !== trim($this.text()) && (0 === h || 100 < h))
|
||||
{
|
||||
$this.addClass('rl-bq-switcher hidden-bq');
|
||||
$('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>')
|
||||
|
|
Loading…
Reference in a new issue