From 4576aff5b5a2972ff1447c23166d658258be2e50 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 16 Apr 2020 12:13:26 +1000 Subject: [PATCH] Fix wizard-link sorting --- assets/javascripts/discourse/components/wizard-links.js.es6 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-links.js.es6 b/assets/javascripts/discourse/components/wizard-links.js.es6 index 16573abb..0683ce4a 100644 --- a/assets/javascripts/discourse/components/wizard-links.js.es6 +++ b/assets/javascripts/discourse/components/wizard-links.js.es6 @@ -13,13 +13,13 @@ export default Component.extend({ anyLinks: notEmpty('links'), @on('didInsertElement') - @observes('links.@each') - didInsertElement() { + @observes('links.[]') + setupSortable() { scheduleOnce('afterRender', () => (this.applySortable())); }, applySortable() { - $(this.element).find("ul") + $(this.element).find(".link-list") .sortable({ tolerance: 'pointer' }) .on('sortupdate', (e, ui) => { this.updateItemOrder(ui.item.data('id'), ui.item.index());