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

Restore disabled dragging and context menu for Bookmarks Bar on Windows #12676

Merged
merged 1 commit into from
Jan 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app/renderer/components/bookmarks/bookmarksToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ class BookmarksToolbar extends React.Component {
// used in renderer
props.showOnlyFavicon = bookmarkUtil.showOnlyFavicon()
props.showFavicon = bookmarkUtil.showFavicon()
props.shouldAllowWindowDrag = windowState.shouldAllowWindowDrag(state, currentWindow, activeFrame, isFocused(state)) &&
!isWindows
props.shouldAllowWindowDrag = !isWindows && windowState.shouldAllowWindowDrag(state, currentWindow, activeFrame, isFocused(state))
props.visibleBookmarks = bookmarkToolbarState.getToolbar(state, currentWindowId)
props.hiddenBookmarks = bookmarkToolbarState.getOther(state, currentWindowId)

Expand All @@ -196,6 +195,7 @@ class BookmarksToolbar extends React.Component {
return <div className={css(
styles.bookmarksToolbar,
this.props.shouldAllowWindowDrag && styles.bookmarksToolbar_allowDragging,
!this.props.shouldAllowWindowDrag && styles.bookmarksToolbar_disallowDragging,
this.props.showOnlyFavicon && styles.bookmarksToolbar_showOnlyFavicon
)}
data-test-id='bookmarksToolbar'
Expand Down Expand Up @@ -242,6 +242,10 @@ const styles = StyleSheet.create({
WebkitAppRegion: 'drag'
},

bookmarksToolbar_disallowDragging: {
WebkitAppRegion: 'no-drag'
},

bookmarksToolbar_showOnlyFavicon: {
padding: `0 0 0 ${globalStyles.spacing.bookmarksToolbarPadding}`
},
Expand Down