DEV: removes _.delay from codebase (#6619)

DEV: removes _.delay from codebase (#6619)

From 30e0d744db267e9f133688f648b0f17199e0839c Mon Sep 17 00:00:00 2001
From: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Date: Mon, 19 Nov 2018 10:47:00 +0100
Subject: [PATCH] DEV: removes _.delay from codebase (#6619)


diff --git a/app/assets/javascripts/discourse/lib/autocomplete.js.es6 b/app/assets/javascripts/discourse/lib/autocomplete.js.es6
index c229d8f..6039c2d 100644
--- a/app/assets/javascripts/discourse/lib/autocomplete.js.es6
+++ b/app/assets/javascripts/discourse/lib/autocomplete.js.es6
@@ -398,10 +398,8 @@ export default function(options) {
   $(window).on("click.autocomplete", () => closeAutocomplete());
   $(this).on("click.autocomplete", () => closeAutocomplete());
 
-  $(this).on("paste.autocomplete", function() {
-    _.delay(function() {
-      me.trigger("keydown");
-    }, 50);
+  $(this).on("paste.autocomplete", () => {
+    Ember.run.later(() => me.trigger("keydown"), 50);
   });
 
   function checkTriggerRule(opts) {

GitHub

1 Like