Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen on Safari disables input on prompt #597

Open
ghost opened this issue Jul 14, 2016 · 1 comment
Open

Fullscreen on Safari disables input on prompt #597

ghost opened this issue Jul 14, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 14, 2016

I have the following code that I use to put a browser into fullscreen mode:

// Find vendor-specific function to call
if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) 
{  
    // Enable full screen
    if (document.documentElement.requestFullscreen) { document.documentElement.requestFullscreen(); } 
    else if (document.documentElement.msRequestFullscreen) { document.documentElement.msRequestFullscreen(); } 
    else if (document.documentElement.mozRequestFullScreen) { document.documentElement.mozRequestFullScreen(); } 
    else if (document.documentElement.webkitRequestFullscreen) { document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); }
} 
else 
{
    // Disable full screen
    if (document.exitFullscreen) { document.exitFullscreen(); } 
    else if (document.msExitFullscreen) { document.msExitFullscreen(); } 
    else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } 
    else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); }
}

However, when in full screen, SweetAlert doesn't allow anything to be typed into the input (text box). Using the regular full screen "green traffic light" button does not cause this problem, but something in the above JS does. Any ideas?

This issue seems to be limited to Safari.

@lionralfs
Copy link
Collaborator

Hey @THEPENGUIN1

I'm unable to reproduce this issue. I've used your snippet (slightly modified, I used an EventListener on 'click' to toggle fullscreen) and this example from the demo page in Safari 11 and was able to type text into the input field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant