Ghost/ghost/admin/app/components/settings/form-fields/site-description.hbs
Kevin Ansfield 4c5144cb61 🐛 Fixed close button on "unsaved changes" modal not always behaving like "Stay" button
no issue

The close button in the unsaved changes modal used the `@close` action directly compared to the "Stay" button which used `(fn @close false)`. The close button version without explicit arguments resulted in the first argument being a `PointerEvent` instance which if checked as a modal return value as `if (shouldClose)` would evaluate as truthy therefore matching the "Leave" behaviour instead of the "Stay" behaviour.

- changed modal to explicitly call `(fn @close false)` when the close button is clicked
- updated design settings route to have an explicit `shouldLeave === true` check so default behaviour is always "Stay"
2022-04-14 12:39:10 +01:00

20 lines
972 B
Handlebars

<div ...attributes>
<div class="flex-grow-1">
<label class="gh-setting-title" for="site-description">Site description</label>
<div class="gh-setting-desc mb3">Used in your theme, meta data and search results</div>
<div class="gh-setting-action" data-test-setting="description">
<GhFormGroup @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="description" @class="description-container">
<input
id="site-description"
type="text"
class="gh-input"
value={{this.settings.description}}
{{on "input" this.update}}
{{on "blur" this.validate}}
data-test-input="siteDescription"
>
<GhErrorMessage @errors={{this.settings.errors}} @property="description"/>
</GhFormGroup>
</div>
</div>
</div>