[PR #892] [MERGED] Fixes issue with having to click the delete icon for attachment twice. #5730

Closed
opened 2026-02-05 10:15:30 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/892
Author: @Abijeet
Created: 6/17/2018
Status: Merged
Merged: 6/17/2018
Merged by: @Abijeet

Base: masterHead: fix/884


📝 Commits (1)

  • 7d81a95 Fixes issue with having to click the delete icon for attachment twice.

📊 Changes

2 files changed (+5 additions, -3 deletions)

View changed files

📝 resources/assets/js/vues/attachment-manager.js (+3 -1)
📝 resources/views/pages/form-toolbox.blade.php (+2 -2)

📄 Description

Fixes #884

This is happening because -

Due to the limitations of modern JavaScript (and the abandonment of Object.observe), Vue cannot detect property addition or deletion. Since Vue performs the getter/setter conversion process during instance initialization, a property must be present in the data object in order for Vue to convert it and make it reactive.

Source: https://vuejs.org/v2/guide/reactivity.html

Also added padding to the icons in the attachment section.

Before
attachment-edit-no-padding

After
attachment-edit-padding

Signed-off-by: Abijeet abijeetpatro@gmail.com


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/892 **Author:** [@Abijeet](https://github.com/Abijeet) **Created:** 6/17/2018 **Status:** ✅ Merged **Merged:** 6/17/2018 **Merged by:** [@Abijeet](https://github.com/Abijeet) **Base:** `master` ← **Head:** `fix/884` --- ### 📝 Commits (1) - [`7d81a95`](https://github.com/BookStackApp/BookStack/commit/7d81a9515687aaff833ab76523a1b909fc21b764) Fixes issue with having to click the delete icon for attachment twice. ### 📊 Changes **2 files changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `resources/assets/js/vues/attachment-manager.js` (+3 -1) 📝 `resources/views/pages/form-toolbox.blade.php` (+2 -2) </details> ### 📄 Description Fixes #884 This is happening because - > Due to the limitations of modern JavaScript (and the abandonment of Object.observe), Vue cannot detect property addition or deletion. Since Vue performs the getter/setter conversion process during instance initialization, a property must be present in the data object in order for Vue to convert it and make it reactive. Source: https://vuejs.org/v2/guide/reactivity.html Also added padding to the icons in the attachment section. **Before** ![attachment-edit-no-padding](https://user-images.githubusercontent.com/1685517/41506361-053ab8a8-723a-11e8-85fb-9a82332b48ca.png) **After** ![attachment-edit-padding](https://user-images.githubusercontent.com/1685517/41506362-08391c7a-723a-11e8-84c6-11c686a17768.png) Signed-off-by: Abijeet <abijeetpatro@gmail.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:15:30 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5730