Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
replace classList with dataset for bookmarksOverflowIndicator
Browse files Browse the repository at this point in the history
Address #10443
Auditors: @luixxiul, @bsclifton
  • Loading branch information
cezaraugusto committed Aug 11, 2017
1 parent 07c6cd9 commit d5a6317
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/renderer/components/bookmarks/bookmarksToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const dndData = require('../../../../js/dndData')
const isWindows = require('../../../common/lib/platformUtil').isWindows()
const frameStateUtil = require('../../../../js/state/frameStateUtil')
const bookmarkUtil = require('../../../common/lib/bookmarkUtil')
const {elementHasDataset} = require('../../../../js/lib/eventUtil')

// Styles
const globalStyles = require('../styles/global')
Expand Down Expand Up @@ -106,7 +107,7 @@ class BookmarksToolbar extends React.Component {

onDragEnter (e) {
if (dndData.hasDragData(e.dataTransfer, dragTypes.BOOKMARK)) {
if (Array.from(e.target.classList).includes('overflowIndicator')) {
if (elementHasDataset(e.target, 'overflowIndicator')) {
this.onMoreBookmarksMenu(e)
}
}
Expand Down Expand Up @@ -192,6 +193,7 @@ class BookmarksToolbar extends React.Component {
{
this.props.hiddenBookmarks.size !== 0
? <BrowserButton
bookmarksOverflowIndicator
iconClass={globalStyles.appIcons.angleDoubleRight}
onClick={this.onMoreBookmarksMenu}
custom={[
Expand Down
1 change: 1 addition & 0 deletions app/renderer/components/common/browserButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class BrowserButton extends ImmutableComponent {
return <button
disabled={this.props.disabled}
data-extension-button={this.props.extensionButton}
data-bookmarks-overflow-indicator={this.props.bookmarksOverflowIndicator}
data-l10n-id={this.props.l10nId}
data-test-id={this.props.testId}
data-test2-id={this.props.test2Id}
Expand Down

0 comments on commit d5a6317

Please sign in to comment.