mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 17:16:32 +08:00
REFACTOR: Remove container from safari-hacks
This commit is contained in:
parent
c7c3fd4209
commit
89d766d089
|
@ -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"),
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user