Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML5Backend Event Swallowing Updates (#3052)
* refactor: remove preventDefaulth in handleTopDragEnter * refactor: remove preventDefault from handleSelectStart * feat: add HTML5Backend options to unblock drag * chore: cut semver doc * fix: typo * feat: add rootElement option for attaching event listeners to * fix: revent some cuts * fix: revert some more cuts * fix: revert more cuts * feat: use localized eventing option in DnDProvider on docsite * fix: revert unblockNativeTypeEvents config options experiment * fix: guard endDrag() invocations with isDragging() * fix: error in dropTarget accept arrays * chore: update semver impact * chore: update semver
- Loading branch information
1 parent
253a725
commit 339dd7a
Showing
7 changed files
with
101 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
releases: | ||
react-dnd: patch | ||
react-dnd-html5-backend: minor | ||
|
||
declined: | ||
- react-dnd-documentation | ||
- react-dnd-examples-decorators | ||
- react-dnd-examples-hooks | ||
- react-dnd-test-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { HTML5BackendImpl } from './HTML5BackendImpl' | ||
import * as NativeTypes from './NativeTypes' | ||
import { DragDropManager, BackendFactory } from 'dnd-core' | ||
import { HTML5BackendContext } from './types' | ||
import { HTML5BackendContext, HTML5BackendOptions } from './types' | ||
export { getEmptyImage } from './getEmptyImage' | ||
export { NativeTypes } | ||
|
||
export const HTML5Backend: BackendFactory = function createBackend( | ||
manager: DragDropManager, | ||
context?: HTML5BackendContext, | ||
options?: HTML5BackendOptions, | ||
): HTML5BackendImpl { | ||
return new HTML5BackendImpl(manager, context) | ||
return new HTML5BackendImpl(manager, context, options) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
export type HTML5BackendContext = Window | undefined | ||
|
||
/** | ||
* Configuration options for the HTML5Backend | ||
*/ | ||
export interface HTML5BackendOptions { | ||
/** | ||
* The root DOM node to use for subscribing to events. Default=Window | ||
*/ | ||
rootElement: Node | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters