Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bf82ccd

Browse files
committedNov 2, 2018
Fix for gskinner#224 highlights vanishing on Chrome
1 parent bbcc3d1 commit bf82ccd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
 

‎dev/sass/views/text.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
> .pad {
3535
box-sizing: border-box;
3636
position: relative;
37+
overflow: hidden;
3738
width: 100%;
3839
flex: 1;
3940

‎dev/src/views/Text.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ export default class Text extends EventDispatcher {
8484
textEl.appendChild(editor.display.wrapper); // move the editor on top of the iframe & canvas.
8585

8686
win.onresize = ()=> {
87+
let w = win.innerWidth|0, h = win.innerHeight|0;
8788
this._startResize();
88-
Utils.defer(()=>this._handleResize(win), "text_resize", 250);
89+
Utils.defer(()=>this._handleResize(w, h), "text_resize", 250);
8990
};
9091
win.onresize();
9192

@@ -174,11 +175,11 @@ export default class Text extends EventDispatcher {
174175
return err.message || app.reference.getError(err);
175176
}
176177

177-
_handleResize(el) {
178+
_handleResize(w, h) {
178179
let canvas = this.canvas, style=canvas.style;
179180
style.visibility = style.opacity = "";
180-
canvas.width = el.innerWidth;
181-
canvas.height = el.innerHeight;
181+
canvas.width = w;
182+
canvas.height = h;
182183
this.editor.refresh();
183184
this._deferUpdate();
184185
}

0 commit comments

Comments
 (0)
Failed to load comments.