mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-01-10 14:42:13 -05:00
Fix firefox wrap and opaque text selection (#474)
This commit is contained in:
parent
09babb15c5
commit
63198c05b4
2 changed files with 4 additions and 3 deletions
|
@ -168,13 +168,13 @@ $border-radius: 0.25rem;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
display: none;
|
display: none;
|
||||||
|
margin: 0px;
|
||||||
|
opacity: .8;
|
||||||
outline: none;
|
outline: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
resize: none;
|
resize: none;
|
||||||
white-space: nowrap;
|
|
||||||
margin: 0px;
|
|
||||||
-webkit-text-fill-color: transparent;
|
-webkit-text-fill-color: transparent;
|
||||||
text-fill-color: transparent;
|
text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,7 +276,8 @@ class TextTool extends paper.Tool {
|
||||||
if (this.guide) this.guide.remove();
|
if (this.guide) this.guide.remove();
|
||||||
this.guide = hoverBounds(this.textBox, TextTool.TEXT_PADDING);
|
this.guide = hoverBounds(this.textBox, TextTool.TEXT_PADDING);
|
||||||
this.guide.dashArray = [4, 4];
|
this.guide.dashArray = [4, 4];
|
||||||
this.element.style.width = `${this.textBox.internalBounds.width}px`;
|
// Prevent line from wrapping
|
||||||
|
this.element.style.width = `${this.textBox.internalBounds.width + 1}px`;
|
||||||
this.element.style.height = `${this.textBox.internalBounds.height}px`;
|
this.element.style.height = `${this.textBox.internalBounds.height}px`;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue