REFACTOR: Remove container from safari-hacks

REFACTOR: Remove container from safari-hacks

diff --git a/app/assets/javascripts/discourse/app/initializers/auto-load-modules.js b/app/assets/javascripts/discourse/app/initializers/auto-load-modules.js
index 6482f52..333f6c3 100644
--- a/app/assets/javascripts/discourse/app/initializers/auto-load-modules.js
+++ b/app/assets/javascripts/discourse/app/initializers/auto-load-modules.js
@@ -21,6 +21,7 @@ export function autoLoadModules(container, registry) {
     siteSettings: container.lookup("site-settings:main"),
     themeSettings: container.lookup("service:theme-settings"),
     keyValueStore: container.lookup("key-value-store:main"),
+    capabilities: container.lookup("capabilities:main"),
     currentUser: container.lookup("current-user:main"),
     site: container.lookup("site:main"),
     session: container.lookup("session:main"),
diff --git a/app/assets/javascripts/discourse/app/lib/safari-hacks.js b/app/assets/javascripts/discourse/app/lib/safari-hacks.js
index 5fa0052..8737226 100644
--- a/app/assets/javascripts/discourse/app/lib/safari-hacks.js
+++ b/app/assets/javascripts/discourse/app/lib/safari-hacks.js
@@ -5,6 +5,7 @@ import {
   iOSWithVisualViewport
 } from "discourse/lib/utilities";
 import { INPUT_DELAY } from "discourse-common/config/environment";
+import { helperContext } from "discourse-common/lib/helpers";
 
 // TODO: remove calcHeight once iOS 13 adoption > 90%
 // In iOS 13 and up we use visualViewport API to calculate height
@@ -78,8 +79,7 @@ export function isWorkaroundActive() {
 
 // per http://stackoverflow.com/questions/29001977/safari-in-ios8-is-scrolling-screen-when-fixed-elements-get-focus/29064810
 function positioningWorkaround($fixedElement) {
-  const caps = Discourse.__container__.lookup("capabilities:main");
-
+  let caps = helperContext().capabilities;
   if (!caps.isIOS || safariHacksDisabled()) {
     return;
   }

GitHub sha: 89d766d0

This commit appears in #10480 which was merged by eviltrout.