Skip to content

Commit

Permalink
Clear cached scroll offset on window scroll
Browse files Browse the repository at this point in the history
This is to avoid a bug where the toolbar, highlighter, etc elements’ position 
would be off in editors positioned inside a scrollable window.
  • Loading branch information
tomichal committed Nov 16, 2017
1 parent 8b4b652 commit 40f267f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/canvas/view/CanvasView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = Backbone.View.extend({

initialize(o) {
_.bindAll(this, 'renderBody', 'onFrameScroll', 'clearOff');
window.onscroll = this.clearOff
this.config = o.config || {};
this.em = this.config.em || {};
this.ppfx = this.config.pStylePrefix || '';
Expand Down

0 comments on commit 40f267f

Please sign in to comment.