Skip to content

Commit

Permalink
Layout: Manually add page.js' onClick handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham authored and jsnajdr committed Oct 31, 2018
1 parent 2b68a9f commit 3758dbb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import classnames from 'classnames';
import page from 'page';

/**
* Internal dependencies
Expand Down Expand Up @@ -59,6 +60,10 @@ class Layout extends Component {
colorSchemePreference: PropTypes.string,
};

pageHandler = e => {
page.onclick( e.nativeEvent );
};

render() {
const sectionClass = classnames(
'layout',
Expand All @@ -78,7 +83,7 @@ class Layout extends Component {
} );

return (
<div className={ sectionClass }>
<div className={ sectionClass } onClick={ this.pageHandler }>
<DocumentHead />
<QuerySites primaryAndRecent />
<QuerySites allSites />
Expand Down

0 comments on commit 3758dbb

Please sign in to comment.