mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03: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 $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();
|
export const startMicrotime = (new window.Date()).getTime();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import _ from '_';
|
||||||
import ko from 'ko';
|
import ko from 'ko';
|
||||||
import Autolinker from 'Autolinker';
|
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 {ComposeType, EventKeyCode, SaveSettingsStep, FolderType} from 'Common/Enums';
|
||||||
import {Mime} from 'Common/Mime';
|
import {Mime} from 'Common/Mime';
|
||||||
import {jassl} from 'Common/Jassl';
|
import {jassl} from 'Common/Jassl';
|
||||||
|
|
@ -1450,6 +1450,18 @@ export function mimeContentType(fileName)
|
||||||
return result;
|
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 {string} url
|
||||||
* @param {number} value
|
* @param {number} value
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ import {
|
||||||
import {
|
import {
|
||||||
trim, isNormal, isArray, inArray,
|
trim, isNormal, isArray, inArray,
|
||||||
pInt, pString, plainToHtml,
|
pInt, pString, plainToHtml,
|
||||||
windowResize, findEmailAndLinks
|
windowResize, findEmailAndLinks,
|
||||||
|
getRealHeight
|
||||||
} from 'Common/Utils';
|
} from 'Common/Utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
@ -459,7 +460,14 @@ class MessageUserStore
|
||||||
{
|
{
|
||||||
$oList.each(function() {
|
$oList.each(function() {
|
||||||
const $this = $(this); // eslint-disable-line no-invalid-this
|
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');
|
$this.addClass('rl-bq-switcher hidden-bq');
|
||||||
$('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>')
|
$('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue