mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Better solution for #826
This commit is contained in:
parent
d6d9be0dab
commit
d4e1e90eef
2 changed files with 13 additions and 9 deletions
13
dev/External/SquireUI.js
vendored
13
dev/External/SquireUI.js
vendored
|
|
@ -67,10 +67,8 @@ class SquireUI
|
||||||
clr = createElement('input'),
|
clr = createElement('input'),
|
||||||
doClr = name => input => {
|
doClr = name => input => {
|
||||||
// https://github.com/the-djmaze/snappymail/issues/826
|
// https://github.com/the-djmaze/snappymail/issues/826
|
||||||
var rect = input.getBoundingClientRect();
|
clr.style.left = (input.offsetLeft + input.parentNode.offsetLeft) + 'px';
|
||||||
clr.style.top = (rect.bottom - clr.offsetHeight) + 'px';
|
clr.style.width = input.offsetWidth + 'px';
|
||||||
clr.style.left = rect.left + 'px';
|
|
||||||
clr.style.width = (rect.right - rect.left) + 'px';
|
|
||||||
|
|
||||||
clr.value = '';
|
clr.value = '';
|
||||||
clr.onchange = () => squire.setStyle({[name]:clr.value});
|
clr.onchange = () => squire.setStyle({[name]:clr.value});
|
||||||
|
|
@ -260,11 +258,8 @@ class SquireUI
|
||||||
browseImage = createElement('input'),
|
browseImage = createElement('input'),
|
||||||
squire = new Squire(wysiwyg, SquireDefaultConfig);
|
squire = new Squire(wysiwyg, SquireDefaultConfig);
|
||||||
|
|
||||||
clr.type = "color";
|
clr.type = 'color';
|
||||||
clr.style.opacity = 0;
|
toolbar.append(clr);
|
||||||
clr.style.position = 'fixed';
|
|
||||||
clr.style.left = '-100em';
|
|
||||||
container.append(clr);
|
|
||||||
|
|
||||||
browseImage.type = 'file';
|
browseImage.type = 'file';
|
||||||
browseImage.accept = 'image/*';
|
browseImage.accept = 'image/*';
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,18 @@
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
|
position: relative;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.squire-toolbar input[type="color"] {
|
||||||
|
bottom: 0;
|
||||||
|
left: -100em;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
width: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
.squire-toolbar select {
|
.squire-toolbar select {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 4px 1.5em 4px 6px;
|
padding: 4px 1.5em 4px 6px;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue