Ghost/ghost/admin/app/services
Emilio Cobos Álvarez 28b5f7de52 🐛 Fixed night shift toggle in Firefox Nightly. (#1174)
Over in:

 * https://github.com/whatwg/html/issues/3840
 * https://bugzilla.mozilla.org/show_bug.cgi?id=1281135

I'm trying to come up with a model for `<link rel="stylesheet" disabled>` in
which Blink / WebKit and Firefox can agree on.

See that HTML spec issue for all the inconsistencies of WebKit / Blink, and the
following post for more context:

 * https://groups.google.com/d/msg/mozilla.dev.platform/BdgNaChHnpY/mhXzCBwSCgAJ

---

Unfortunately, my change to Firefox breaks the Ghost Admin panel night-mode
switch (you can see it in Firefox Nightly).

This is because with my change, removing the `disabled` attribute from an
stylesheet behaves the same regardless of whether the `disabled` attribute is
added dynamically or not.

That means that adding the `disabled` attribute dynamically "unloads" the
stylesheet completely (just like when the attribute is there before inserting
the link in the document, or from the parser). Thus removing the attribute will
load the stylesheet again and fire a load event.

This is problematic for the code as-is, because it means that each time that the
load event fires when the disabled attribute is removed on an alternate, then
it's added again. :)

Prevent that from happening by removing the load event listener ASAP. What this
code wants is to only resolve the promise once after all.

Given this is so far the only regression from my change that has been reported
(over at https://bugzilla.mozilla.org/show_bug.cgi?id=1546707), I think fixing
the Ghost-Admin panel is worth it.

If this pattern is somehow common, then we'll probably revert that patch and go
back to the sad current state of affairs regarding interop :(
2019-04-25 09:40:26 +02:00
..
ajax.js 🐛 Fixed missing error notification when attempting to activate an invalid theme 2019-03-25 11:32:29 +00:00
clock.js
config.js
dropdown.js
event-bus.js
feature.js Refactored usage of .get('property') with es5 getters 2019-03-06 13:54:14 +00:00
ghost-paths.js
lazy-loader.js 🐛 Fixed night shift toggle in Firefox Nightly. (#1174) 2019-04-25 09:40:26 +02:00
media-queries.js
media.js
notifications.js Fixed notificaitons.displayDelayed() throwing an error 2019-03-25 12:28:14 +00:00
resize-detector.js
session.js 🐛 Fixed error after logging in from a nested admin URL 2019-03-25 13:01:58 +00:00
settings.js Refactored usage of .get('property') with es5 getters 2019-03-06 13:54:14 +00:00
slug-generator.js Refactored usage of .get('property') with es5 getters 2019-03-06 13:54:14 +00:00
tour.js View site inside Ghost Admin 2019-03-21 10:33:14 +01:00
ui.js Refactored usage of .get('property') with es5 getters 2019-03-06 13:54:14 +00:00
unsplash.js Refactored usage of .get('property') with es5 getters 2019-03-06 13:54:14 +00:00
upgrade-status.js Refactored usage of .get('property') with es5 getters 2019-03-06 13:54:14 +00:00