|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +### 4.3.1 (Apr 11, 2020) |
| 4 | + |
| 5 | +> This is a bugfix release. |
| 6 | +
|
| 7 | +- Happy Easter! |
| 8 | +- Fixed a serious bug that caused `<DraggableCore>` not to pass styles. |
| 9 | + - `React.cloneElement` has an odd quirk. When you do: |
| 10 | + ```js |
| 11 | + return React.cloneElement(this.props.children, {style: this.props.children.props.style}); |
| 12 | + ``` |
| 13 | + , `style` ends up undefined. |
| 14 | +- Fixed a bug that caused debug output to show up in the build. |
| 15 | + - `babel-loader` cache does not invalidate when it should. I had modified webpack.config.js in the last version but it reused stale cache. |
| 16 | + |
| 17 | +### 4.3.0 (Apr 10, 2020) |
| 18 | + |
| 19 | +- Fix setState warning after dismount if drag still active. Harmless, but prints a warning. [#424](https://github.com/mzabriskie/react-draggable/pull/424) |
| 20 | +- Fix a long-standing issue where text inputs would unfocus upon dismounting a `<Draggable>`. |
| 21 | + - Thanks @schnerd, [#450](https://github.com/mzabriskie/react-draggable/pull/450) |
| 22 | +- Fix an issue where the insides of a `<Draggable>` were not scrollable on touch devices due to the outer container having `touch-action: none`. |
| 23 | + - This was a long-standing hack for mobile devices. Without it, the page will scroll while you drag the element. |
| 24 | + - The new solution will simply cancel the touch event `e.preventDefault()`. However, due to changes in Chrome >= 56, this is only possible on |
| 25 | + non-passive event handlers. To fix this, we now add/remove the touchEvent on lifecycle events rather than using React's event system. |
| 26 | + - [#465](https://github.com/mzabriskie/react-draggable/pull/465) |
| 27 | +- Upgrade devDeps and fix security warnings. None of them actually applied to this module. |
| 28 | +
|
| 29 | +### 4.2.0 (Dec 2, 2019) |
| 30 | +
|
| 31 | +- Fix: Apply `scale` parameter also while dragging an element. [#438](https://github.com/mzabriskie/react-draggable/pull/438) |
| 32 | +- Fix: Don't ship `process.env.DRAGGABLE_DEBUG` checks in cjs/esm. [#445](https://github.com/mzabriskie/react-draggable/pull/445) |
| 33 | + |
| 34 | +### 4.1.0 (Oct 25, 2019) |
| 35 | + |
| 36 | +- Add `"module"` to `package.json`. There are now three builds: |
| 37 | + * **`"main"`**: ES5-compatible CJS build, suitable for most use cases with maximum compatibility. |
| 38 | + - For legacy reasons, this has exports of the following shape, which ensures no surprises in CJS or ESM polyfilled environments: |
| 39 | + ```js |
| 40 | + module.exports = Draggable; |
| 41 | + module.exports.default = Draggable; |
| 42 | + module.exports.DraggableCore = DraggableCore; |
| 43 | + ``` |
| 44 | + * **`"web"`**: Minified UMD bundle exporting to `window.ReactDraggable` with the same ES compatibility as the "main" build. |
| 45 | + * **`"module"`**: ES6-compatible build using import/export. |
| 46 | + |
| 47 | + This should fix issues like https://github.com/STRML/react-resizable/issues/113 while allowing modern bundlers to consume esm modules in the future. |
| 48 | + |
| 49 | + No compatibility changes are expected. |
| 50 | + |
| 51 | +### 4.0.3 (Sep 10, 2019) |
| 52 | + |
| 53 | +- Add typings and sourcemap to published npm package. |
| 54 | + - This compresses well so it does not bloat the package by much. Would be nice if npm had another delivery mechanism for optional modes, like web/TS. |
| 55 | + |
| 56 | +### 4.0.2 (Sep 9, 2019) |
| 57 | + |
| 58 | +- Republish to fix packaging errors. Fixes #426 |
| 59 | + |
| 60 | +### 4.0.1 (Sep 7, 2019) |
| 61 | + |
| 62 | +- Republish of 4.0.0 to fix a mistake where webpack working files were erroneously included in the package. Use this release instead as it is much smaller. |
| 63 | + |
| 64 | +### 4.0.0 (Aug 26, 2019) |
| 65 | + |
| 66 | +> This is a major release due to a React compatibility change. If you are already on React >= 16.3, this upgrade is non-breaking. |
| 67 | + |
| 68 | +- *Requires React 16.3+ due to use of `getDerivedStateFromProps`. |
| 69 | + - See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html for why this was done. |
| 70 | +- Upgraded build environment to Babel 7. |
| 71 | +- Switched build from rollup to webpack@4 to simplify. |
| 72 | +- Added CJS build that does not bundle `classNames` & `prop-types` into the build. This should result in marginally smaller bundle sizes for applications that use bundlers. |
| 73 | +- Removed Bower build. |
| 74 | + |
| 75 | +### 3.3.2 (Aug 16, 2019) |
| 76 | + |
| 77 | +- Use `all: inherit` instead of `background: transparent;` to fix selection styles. |
| 78 | + - Fixes https://github.com/mzabriskie/react-draggable/issues/315 |
| 79 | + |
| 80 | +### 3.3.1 (Aug 12, 2019) |
| 81 | + |
| 82 | +- Fix React 16.9 `componentWillMount` deprecation. |
| 83 | + |
| 84 | +### 3.3.0 (Apr 18, 2019) |
| 85 | + |
| 86 | +- Addition of `positionOffset` prop, which can be Numbers (px) or string percentages (like `"10%"`). See the README for more. |
| 87 | + |
| 88 | +### 3.2.1 (Mar 1, 2019) |
| 89 | + |
| 90 | +- Reverted https://github.com/mzabriskie/react-draggable/pull/361. |
| 91 | + |
| 92 | +### ~3.2.0 (Feb 27, 2019)~ |
| 93 | + |
| 94 | +> Note: this release has been pulled due to an inadvertent breaking change. See https://github.com/mzabriskie/react-draggable/issues/391 |
| 95 | + |
| 96 | +- Feature: `defaultPosition` now allows string offsets (like {x: '10%', y: '10%'}) then calculates deltas from there. See the examples and the PR [#361](https://github.com/mzabriskie/react-draggable/pull/361/). Thanks to @tnrich and @eric-burel. |
| 97 | +- Bugfix: Export `DraggableEvent` type for Flow consumers. Thanks @elie222. |
| 98 | + |
| 99 | +### 3.1.1 (Dec 21, 2018) |
| 100 | + |
| 101 | +- Bugfix: Minor type change on DraggableEventHandler TypeScript export ([#374](https://github.com/mzabriskie/react-draggable/pull/374)) |
| 102 | + |
| 103 | +### 3.1.0 (Dec 21, 2018) |
| 104 | + |
| 105 | +- Feature: Added `scale` prop ([#352](https://github.com/mzabriskie/react-draggable/pull/352)) |
| 106 | + - Thanks, @wootencl |
| 107 | +- Bugfix: Remove process.browser which is missing in browser ([#329]((https://github.com/mzabriskie/react-draggable/pull/329)) |
| 108 | +- Bugfix: Fix selection api on IE ([#292](https://github.com/mzabriskie/react-draggable/pull/292)) |
| 109 | +- Bugfix: Fixes some issues in the type definitions for TypeScript ([#331]((https://github.com/mzabriskie/react-draggable/pull/331)) |
| 110 | +- Bugfix: Fix compare where portal elements are different instance to main window ([#359]((https://github.com/mzabriskie/react-draggable/pull/359)) |
| 111 | + |
| 112 | +### 3.0.5 (Jan 11, 2018) |
| 113 | + |
| 114 | +- Bugfix: Fix crash in test environments during removeUserSelectStyles(). |
| 115 | + |
| 116 | +### 3.0.4 (Nov 27, 2017) |
| 117 | + |
| 118 | +- Bugfix: Fix "Cannot call property 'call' of undefined" (matchesSelector) |
| 119 | + - Fixes [#300](https://github.com/mzabriskie/react-draggable/issues/300) |
| 120 | + |
| 121 | +### 3.0.3 (Aug 31, 2017) |
| 122 | + |
| 123 | +- Bugfix: Fix deprecation warnings caused by `import * as React` (Flow best practice). |
| 124 | + - See https://github.com/facebook/react/issues/10583 |
| 125 | + |
| 126 | +### 3.0.2 (Aug 22, 2017) |
| 127 | + |
| 128 | +> 3.0.0 and 3.0.1 have been unpublished due to a large logfile making it into the package. |
| 129 | + |
| 130 | +- Bugfix: Tweaked `.npmignore`. |
| 131 | + |
| 132 | +### 3.0.1 (Aug 21, 2017) |
| 133 | + |
| 134 | +- Bugfix: Flow-type should no longer throw errors for consumers. |
| 135 | + - It appears Flow can't resolve a sub-package's interfaces. |
| 136 | + |
| 137 | +### 3.0.0 (Aug 21, 2017) |
| 138 | + |
| 139 | +> Due to an export change, this is semver-major. |
| 140 | + |
| 141 | +- Breaking: For TypeScript users, `<Draggable>` is now exported as `module.exports` and `module.exports.default`. |
| 142 | +- Potentially Breaking: We no longer set `user-select: none` on all elements while dragging. Instead, |
| 143 | + the [`::selection` psuedo element](https://developer.mozilla.org/en-US/docs/Web/CSS/::selection) is used. |
| 144 | + - Depending on your application, this could cause issues, so be sure to test. |
| 145 | +- Bugfix: Pass bounded `x`/`y` to callbacks. See [#226](https://github.com/mzabriskie/react-draggable/pull/226). |
| 146 | +- Internal: Upgraded dependencies. |
| 147 | + |
| 148 | +### 2.2.6 (Apr 30, 2017) |
| 149 | + |
| 150 | +- Bugfix: Missing export default on TS definition (thanks @lostfictions) |
| 151 | +- Internal: TS test suite (thanks @lostfictions) |
| 152 | + |
| 153 | +### 2.2.5 (Apr 28, 2017) |
| 154 | + |
| 155 | +- Bugfix: Typescript definition was incorrect. [#244](https://github.com/mzabriskie/react-draggable/issues/244) |
| 156 | + |
| 157 | +### 2.2.4 (Apr 27, 2017) |
| 158 | + |
| 159 | +- Internal: Moved `PropTypes` access to `prop-types` package for React 15.5 (prep for 16) |
| 160 | +- Feature: Added TypeScript definitions (thanks @erfangc) |
| 161 | +- Bugfix: No longer can erroneously add user-select style multiple times |
| 162 | +- Bugfix: OffsetParent with padding problem, fixes [#218](https://github.com/mzabriskie/react-draggable/issues/218) |
| 163 | +- Refactor: Misc example updates. |
| 164 | + |
3 | 165 | ### 2.2.3 (Nov 21, 2016) |
4 | 166 |
|
5 | 167 | - Bugfix: Fix an issue with the entire window scrolling on a drag on iDevices. Thanks @JaneCoder. See #183 |
|
0 commit comments