From 4a7c675d060e099048df770902786f6ed3a19ec3 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 6 Jan 2018 09:31:37 +0300 Subject: [PATCH] fix '.add-applies-to' click listener --- edit/applies-to-line-widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit/applies-to-line-widget.js b/edit/applies-to-line-widget.js index af0df7be..b154f1b5 100644 --- a/edit/applies-to-line-widget.js +++ b/edit/applies-to-line-widget.js @@ -73,7 +73,7 @@ function createAppliesToLineWidget(cm) { }, '.add-applies-to': (item, apply) => { - const applies = this.closest('.applies-to').__applies; + const applies = item.closest('.applies-to').__applies; const i = applies.indexOf(apply); const pos = apply.mark.find().to; const text = `, ${apply.type.text}("")`;