From 08bdc5800bb1d19250fef2e1631466f299ac9c9c Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Wed, 26 Jun 2024 20:07:49 +0200
Subject: [PATCH] fix: remove display property #219

---
 source/dom/customelement.mjs | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/source/dom/customelement.mjs b/source/dom/customelement.mjs
index d505c69cf..0372201a8 100644
--- a/source/dom/customelement.mjs
+++ b/source/dom/customelement.mjs
@@ -327,7 +327,6 @@ class CustomElement extends HTMLElement {
 	 * @property {Object} templates Specifies the templates used by the control.
 	 * @property {string} templates.main=undefined Specifies the main template used by the control.
 	 * @property {Object} templateMapping Specifies the mapping of templates.
-	 * @property {string} display=block Specifies the display mode of the control.
 	 * @since 1.8.0
 	 */
 	get defaults() {
@@ -339,20 +338,19 @@ class CustomElement extends HTMLElement {
 				main: undefined,
 			},
 			templateMapping: {},
-			display: "block"
 		};
 	}
 
 	/**
 	 * This method updates the labels of the element.
-	 * The labels are defined in the options object.
+	 * The labels are defined in the option object.
 	 * The key of the label is used to retrieve the translation from the document.
 	 * If the translation is different from the label, the label is updated.
 	 *
 	 * Before you can use this method, you must have loaded the translations.
 	 *
 	 * @returns {Monster.DOM.CustomElement}
-	 * @throws {Error}  Cannot find element with translations. Add a translations object to the document.
+	 * @throws {Error}  Cannot find an element with translations. Add a translation object to the document.
 	 */
 	updateI18n() {
 		let translations;
@@ -597,8 +595,6 @@ class CustomElement extends HTMLElement {
 		let elements;
 		let nodeList;
 
-		this.style.setProperty("display", this.getOption("display"));
-
 		// Extract options from attributes and set them
 		const AttributeOptions = getOptionsFromAttributes.call(this);
 		if (
-- 
GitLab