Bug 1533549 - Column breakpoints seem to spring into existance when you stop scrolling. r=loganfsmyth
authorJason Laster <jlaster@mozilla.com>
Fri, 08 Mar 2019 16:27:16 +0000
changeset 521179 6d58a14e2ceff0829263dcabb07f5c2db07adf0d
parent 521178 5d5db39b04977e9095ecc25bb66d5438010d0cf0
child 521180 cd0a4ead024efdaa27e4ec82e80f3aee7f632ec3
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth
bugs1533549
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1533549 - Column breakpoints seem to spring into existance when you stop scrolling. r=loganfsmyth Differential Revision: https://phabricator.services.mozilla.com/D22632
devtools/client/debugger/new/src/components/Editor/index.js
--- a/devtools/client/debugger/new/src/components/Editor/index.js
+++ b/devtools/client/debugger/new/src/components/Editor/index.js
@@ -5,17 +5,17 @@
 // @flow
 
 import PropTypes from "prop-types";
 import React, { PureComponent } from "react";
 import { bindActionCreators } from "redux";
 import ReactDOM from "react-dom";
 import { connect } from "../../utils/connect";
 import classnames from "classnames";
-import { debounce } from "lodash";
+import { throttle } from "lodash";
 
 import { isLoaded } from "../../utils/source";
 import { isFirefox } from "devtools-environment";
 import { features } from "../../utils/prefs";
 import { getIndentation } from "../../utils/indentation";
 
 import { showMenu } from "devtools-contextmenu";
 import {
@@ -302,17 +302,17 @@ class Editor extends PureComponent<Props
     const line = this.getCurrentLine();
     if (typeof line !== "number") {
       return;
     }
 
     this.toggleConditionalPanel(line);
   };
 
-  onEditorScroll = debounce(this.props.updateViewport, 200);
+  onEditorScroll = throttle(this.props.updateViewport, 100);
 
   onKeyDown(e: KeyboardEvent) {
     const { codeMirror } = this.state.editor;
     const { key, target } = e;
     const codeWrapper = codeMirror.getWrapperElement();
     const textArea = codeWrapper.querySelector("textArea");
 
     if (key === "Escape" && target == textArea) {