From 3ba22f14e09e3c3ded33f28b1f82e2bc62d26de6 Mon Sep 17 00:00:00 2001 From: Kianna <30884335+kiannaquach@users.noreply.github.com> Date: Wed, 20 Sep 2023 08:15:52 -0700 Subject: [PATCH] Backport 1.14.3: confirm delete modal for namespaces (#23109) * Possible soln 1: add a class w/ min height instead of calculated height * Remove confirm-height style * Add changelog * Fix changelog * Possible soln 2: apply style using native js * Remove copyright since 1.14 didnt have --- changelog/23066.txt | 3 +++ ui/lib/core/addon/components/confirm.js | 5 +---- ui/lib/core/addon/templates/components/confirm.hbs | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 changelog/23066.txt diff --git a/changelog/23066.txt b/changelog/23066.txt new file mode 100644 index 000000000..f4636b97d --- /dev/null +++ b/changelog/23066.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix the issue where confirm delete dropdown is being cut off +``` diff --git a/ui/lib/core/addon/components/confirm.js b/ui/lib/core/addon/components/confirm.js index f7511ce42..8f581a51b 100644 --- a/ui/lib/core/addon/components/confirm.js +++ b/ui/lib/core/addon/components/confirm.js @@ -32,9 +32,6 @@ export default Component.extend({ openTrigger: null, height: 0, focusTrigger: null, - style: computed('height', function () { - return `height: ${this.height}px`; - }), wormholeReference: null, wormholeId: computed('elementId', function () { return `confirm-${this.elementId}`; @@ -51,7 +48,7 @@ export default Component.extend({ const height = this.openTrigger ? this.element.querySelector('.confirm-overlay').clientHeight : this.element.querySelector('.confirm').clientHeight; - this.set('height', height); + this.element.querySelector('.confirm-wrapper').style = `height: ${height}px;`; }, actions: { onTrigger: function (itemId, e) { diff --git a/ui/lib/core/addon/templates/components/confirm.hbs b/ui/lib/core/addon/templates/components/confirm.hbs index e2c51b0ea..c9b97f598 100644 --- a/ui/lib/core/addon/templates/components/confirm.hbs +++ b/ui/lib/core/addon/templates/components/confirm.hbs @@ -1,6 +1,4 @@ -{{! template-lint-disable no-inline-styles}} - -
+
{{yield (hash