Fix firefox wrap and opaque text selection (#474)

This commit is contained in:
DD Liu 2018-05-24 14:16:00 -04:00 committed by GitHub
parent 09babb15c5
commit 63198c05b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -168,13 +168,13 @@ $border-radius: 0.25rem;
background: transparent;
border: none;
display: none;
margin: 0px;
opacity: .8;
outline: none;
overflow: hidden;
padding: 0px;
position: absolute;
resize: none;
white-space: nowrap;
margin: 0px;
-webkit-text-fill-color: transparent;
text-fill-color: transparent;
}

View file

@ -276,7 +276,8 @@ class TextTool extends paper.Tool {
if (this.guide) this.guide.remove();
this.guide = hoverBounds(this.textBox, TextTool.TEXT_PADDING);
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`;
}
/**