Skip to content

Commit

Permalink
Merge branch i/6202-remove-env.isEdge to master.
Browse files Browse the repository at this point in the history
Internal: Removed mentions on Edge. See #6202.
  • Loading branch information
Reinmar committed Apr 20, 2020
2 parents 05d087f + e8523de commit 6cbd529
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
7 changes: 1 addition & 6 deletions packages/ckeditor5-paste-from-office/src/filters/space.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ export function normalizeSpacing( htmlString ) {
*/
export function normalizeSpacerunSpans( htmlDocument ) {
htmlDocument.querySelectorAll( 'span[style*=spacerun]' ).forEach( el => {
// Use `el.childNodes[ 0 ].data.length` instead of `el.innerText.length`. For `el.innerText.length` which
// contains spaces mixed with ` ` Edge browser returns incorrect length.
const innerTextLength = ( el.childNodes &&
el.childNodes[ 0 ] &&
el.childNodes[ 0 ].data &&
el.childNodes[ 0 ].data.length ) || 0;
const innerTextLength = el.innerText.length || 0;

el.innerHTML = Array( innerTextLength + 1 ).join( '\u00A0 ' ).substr( 0, innerTextLength );
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
import List from '@ckeditor/ckeditor5-list/src/list';
import Image from '@ckeditor/ckeditor5-image/src/image';
import Table from '@ckeditor/ckeditor5-table/src/table';
import env from '@ckeditor/ckeditor5-utils/src/env';

import PasteFromOffice from '../../src/pastefromoffice';
import { generateTests } from '../_utils/utils';
Expand Down Expand Up @@ -43,10 +42,10 @@ describe( 'PasteFromOffice - integration', () => {
plugins: [ Clipboard, Paragraph, Image, Table, PasteFromOffice ]
},
skip: {
chrome: ( env.isEdge ? [ 'adjacentGroups' ] : [] ),
firefox: ( env.isEdge ? [ 'adjacentGroups' ] : [] ),
safari: ( env.isEdge ? [ 'adjacentGroups' ] : [] ),
edge: ( env.isEdge ? [] : [ 'adjacentGroups' ] )
chrome: [],
firefox: [],
safari: [],
edge: [ 'adjacentGroups' ]
}
} );

Expand Down

0 comments on commit 6cbd529

Please sign in to comment.