Skip to content

Commit

Permalink
fix: removing blocks in the editor for {{#each}} types after a drag&d…
Browse files Browse the repository at this point in the history
…rop was not possible
  • Loading branch information
gregorybesson committed Aug 6, 2017
1 parent ea7a9b3 commit 13f5b0f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/server/public/abecms/scripts/modules/EditorBlock.js
Expand Up @@ -84,6 +84,10 @@ export default class EditorBlock {
)
block.innerHTML = replaceHtml

block
.querySelector('button.remove-block')
.addEventListener('click', this._handleClickRemoveBlock)

i++
})
this.onMoveBlock._fire()
Expand All @@ -108,7 +112,6 @@ export default class EditorBlock {
* @return {[type]} [description]
*/
_clickRemoveBlock(e) {
console.log('inthere')
var target = e.target,
elem = target,
parent = null,
Expand Down Expand Up @@ -233,6 +236,10 @@ export default class EditorBlock {
wasFound = true
startNumber = nb
}

block
.querySelector('button.remove-block')
.addEventListener('click', this._handleClickRemoveBlock)
}
)

Expand Down

0 comments on commit 13f5b0f

Please sign in to comment.