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

Commit

Permalink
UrlBarIcon drag to bookmark fix
Browse files Browse the repository at this point in the history
Fix #8151

Test plan: npm run test -- --grep="UrlBarIcon"

I don't think there's a good way to add automated tests for drag and drop yet
  • Loading branch information
bbondy committed Apr 10, 2017
1 parent 485336d commit 62665a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/renderer/components/urlBarIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const dragTypes = require('../../../js/constants/dragTypes')
const dndData = require('../../../js/dndData')
const {isSourceAboutUrl} = require('../../../js/lib/appUrlUtil')
const {isPotentialPhishingUrl} = require('../../../js/lib/urlutil')
const windowStore = require('../../../js/stores/windowStore')
const {getActiveFrame} = require('../../../js/state/frameStateUtil')
const searchIconSize = 16

class UrlBarIcon extends ImmutableComponent {
Expand Down Expand Up @@ -89,7 +91,8 @@ class UrlBarIcon extends ImmutableComponent {
}
onDragStart (e) {
dndData.setupDataTransferURL(e.dataTransfer, this.props.location, this.props.title)
dndData.setupDataTransferBraveData(e.dataTransfer, dragTypes.TAB, this.activeFrame)
const activeFrame = getActiveFrame(windowStore.state)
dndData.setupDataTransferBraveData(e.dataTransfer, dragTypes.TAB, activeFrame)
}
render () {
// allow click and drag (unless tab is showing a message box)
Expand Down

1 comment on commit 62665a5

@bsclifton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbondy awesome- thanks for grabbing this 😄

Please sign in to comment.