private-face / jquery.fullscreen

jQuery plugin for opening page elements in fullscreen mode.
MIT License
148 stars 83 forks source link

isFullScreen() is delayed #42

Open gubi opened 5 years ago

gubi commented 5 years ago
$('<a>', {"href": "javascript:;"}).append(
    $('<span>', {"class": "fas fa-expand"})
).click((e) => {
    $("#graph").fullscreen({
        toggleClass: "fullscreen"
    })
    console.log($.fullscreen.isFullScreen());
    console.log($("#graph").hasClass("fullscreen"));
})

When I click on the button the console reports this:

false
true