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

Commit 54f89bc

Browse files
committed
Merge pull request #12676 from brave/fix/issue-11728
Restore disabled dragging and context menu for Bookmarks Bar on Windows
1 parent 6041001 commit 54f89bc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

app/renderer/components/bookmarks/bookmarksToolbar.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ class BookmarksToolbar extends React.Component {
179179
// used in renderer
180180
props.showOnlyFavicon = bookmarkUtil.showOnlyFavicon()
181181
props.showFavicon = bookmarkUtil.showFavicon()
182-
props.shouldAllowWindowDrag = windowState.shouldAllowWindowDrag(state, currentWindow, activeFrame, isFocused(state)) &&
183-
!isWindows
182+
props.shouldAllowWindowDrag = !isWindows && windowState.shouldAllowWindowDrag(state, currentWindow, activeFrame, isFocused(state))
184183
props.visibleBookmarks = bookmarkToolbarState.getToolbar(state, currentWindowId)
185184
props.hiddenBookmarks = bookmarkToolbarState.getOther(state, currentWindowId)
186185

@@ -200,7 +199,8 @@ class BookmarksToolbar extends React.Component {
200199
showFavicon: this.props.showFavicon,
201200
showOnlyFavicon: this.props.showOnlyFavicon,
202201
[css(styles.bookmarksToolbar)]: true,
203-
[css(this.props.shouldAllowWindowDrag && styles.bookmarksToolbar__allowDragging)]: true,
202+
[css(this.props.shouldAllowWindowDrag && styles.bookmarksToolbar_allowDragging)]: true,
203+
[css(!this.props.shouldAllowWindowDrag && styles.bookmarksToolbar_disallowDragging)]: true,
204204
[css(styles.bookmarksToolbar__showOnlyFavicon)]: true
205205
})}
206206
data-test-id='bookmarksToolbar'
@@ -239,9 +239,13 @@ const styles = StyleSheet.create({
239239
padding: `0 ${globalStyles.spacing.bookmarksToolbarPadding}`,
240240
margin: `${globalStyles.spacing.navbarMenubarMargin} 0`
241241
},
242-
bookmarksToolbar__allowDragging: {
242+
bookmarksToolbar_allowDragging: {
243243
WebkitAppRegion: 'drag'
244244
},
245+
246+
bookmarksToolbar_disallowDragging: {
247+
WebkitAppRegion: 'no-drag'
248+
},
245249
bookmarksToolbar__showOnlyFavicon: {
246250
padding: `0 0 0 ${globalStyles.spacing.bookmarksToolbarPadding}`
247251
},

0 commit comments

Comments
 (0)