mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 17:52:47 +00:00
Fix "clicked on the toggle ring" crash with scroll lock.
The code was doing dom-climbing math based on clicking on the div contents but was attached to the div. Moved the onClick to the contents.
This commit is contained in:
@@ -121,6 +121,7 @@ const Editor = createClass({
|
|||||||
const RIGHTARROW_KEY = 39;
|
const RIGHTARROW_KEY = 39;
|
||||||
|
|
||||||
if(this.props.liveScroll) {
|
if(this.props.liveScroll) {
|
||||||
|
console.log('Should be scrollig!');
|
||||||
const movementKeys = [13, 33, 34, LEFTARROW_KEY, 38, RIGHTARROW_KEY, 40];
|
const movementKeys = [13, 33, 34, LEFTARROW_KEY, 38, RIGHTARROW_KEY, 40];
|
||||||
if(movementKeys.includes(e.keyCode)) {
|
if(movementKeys.includes(e.keyCode)) {
|
||||||
const curPage = this.getCurrentPage();
|
const curPage = this.getCurrentPage();
|
||||||
|
|||||||
@@ -153,9 +153,8 @@ const SplitPane = createClass({
|
|||||||
<i className='fas fa-arrow-right' />
|
<i className='fas fa-arrow-right' />
|
||||||
</div>
|
</div>
|
||||||
<div id='scrollToggleDiv' className={`arrow lock`}
|
<div id='scrollToggleDiv' className={`arrow lock`}
|
||||||
style={{ left: this.state.currentDividerPos-4 }}
|
style={{ left: this.state.currentDividerPos-4 }} >
|
||||||
onClick={this.liveScrollToggle} >
|
<i id='scrollToggle' className={`fas fa-lock`} onClick={this.liveScrollToggle}/>
|
||||||
<i id='scrollToggle' className={`fas fa-lock`} />
|
|
||||||
</div>
|
</div>
|
||||||
</>;
|
</>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user