Fixed contenteditable save

This commit is contained in:
Eduard Urbach 2018-10-11 12:09:12 +09:00
parent fc96fe861e
commit b2f9754a19
3 changed files with 3 additions and 5 deletions

View File

@ -13,5 +13,5 @@ export function installExtension(arn: AnimeNotifier, button: HTMLElement) {
// Desktop app installation
export function installApp() {
alert("Open your browser menu > 'More tools' > 'Add to desktop' and enable 'Open as window'.")
alert("Open your browser menu > 'Install Anime Notifier'.")
}

View File

@ -1019,8 +1019,7 @@ export default class AnimeNotifier {
// Disallow Enter key in contenteditables and make it blur the element instead
if(e.keyCode === 13) {
if("blur" in activeElement) {
let blur = activeElement["blur"] as Function
blur()
(activeElement["blur"] as Function)()
}
return preventDefault()

View File

@ -1,7 +1,6 @@
export function requestIdleCallback(func: Function) {
if("requestIdleCallback" in window) {
let requestIdleCallback = window["requestIdleCallback"] as Function
requestIdleCallback(func)
(window["requestIdleCallback"] as Function)(func)
} else {
func()
}