diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 58dc3bb9790e4..307524a94af5d 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -11,10 +11,11 @@ For each user feature we should also add a importance categorization label to i ## Unreleased - [*] [internal] Move InserterButton from components package to block-editor package [#56494] +- [**] Editor displays user of network connection status when offline [#56627] +- [**] Fixes a crash on pasting MS Word list markup [#56653] ## 1.109.1 - [***] Fix issue when backspacing in an empty Paragraph block [#56496] -- [**] Editor displays user of network connection status when offline [#56627] ## 1.109.0 - [*] Audio block: Improve legibility of audio file details on various background colors [#55627] diff --git a/packages/react-native-editor/src/jsdom-patches.js b/packages/react-native-editor/src/jsdom-patches.js index f33dd892f8c18..c86e4c82f3127 100644 --- a/packages/react-native-editor/src/jsdom-patches.js +++ b/packages/react-native-editor/src/jsdom-patches.js @@ -171,6 +171,18 @@ Element.prototype.closest = function ( selector ) { return null; }; +/** + * Implementation of Element.prototype.remove based on polyfills: + * - https://github.com/chenzhenxi/element-remove/blob/master/index.js + * (referenced in https://developer.mozilla.org/en-US/docs/Web/API/Element/remove#see_also) + * - https://github.com/JakeChampion/polyfill-library/blob/master/polyfills/Element/prototype/remove/polyfill.js + */ +Element.prototype.remove = function () { + if ( this.parentNode ) { + this.parentNode.removeChild( this ); + } +}; + /** * Helper function to check if a node implements the NonDocumentTypeChildNode * interface diff --git a/test/native/jest.config.js b/test/native/jest.config.js index ad5c794ebbce8..4859ea597e0f6 100644 --- a/test/native/jest.config.js +++ b/test/native/jest.config.js @@ -24,7 +24,6 @@ const transpiledPackageNames = glob( 'packages/*/src/index.{js,ts}' ).map( const RAW_HANDLING_UNSUPPORTED_UNIT_TESTS = [ 'html-formatting-remover', 'phrasing-content-reducer', - 'ms-list-converter', 'figure-content-reducer', 'special-comment-converter', 'normalise-blocks',