Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty normalized style should be output the same way as it would not be set #6225

Closed
jodator opened this issue Feb 11, 2020 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1823
Assignees
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.

Comments

@jodator
Copy link
Contributor

jodator commented Feb 11, 2020

📝 Provide detailed reproduction steps (if any)

Test case:

it( 'should remove normalized properties one by one', () => {
	const stylesProcessor = new StylesProcessor();
	addPaddingRules( stylesProcessor );
	StylesMap._setProcessor( stylesProcessor );
	const stylesMap = new StylesMap();
	stylesMap.setTo( 'padding:1px' );

	stylesMap.remove( 'padding-top' );
	stylesMap.remove( 'padding-right' );
	stylesMap.remove( 'padding-bottom' );
	stylesMap.remove( 'padding-left' );

	expect( stylesMap.toString() ).to.equal( '' );
} );

✔️ Expected result

the tests pass

❌ Actual result

the test does not pass

📃 Other details


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@jodator jodator added type:bug This issue reports a buggy (incorrect) behavior. package:engine labels Feb 11, 2020
@jodator jodator added this to the iteration 29 milestone Feb 11, 2020
@jodator jodator self-assigned this Feb 11, 2020
Reinmar added a commit to ckeditor/ckeditor5-engine that referenced this issue Feb 12, 2020
Internal: Removing normalized properties from styles map should clean the internal object. Closes ckeditor/ckeditor5#6225.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant