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

Clicking on bottom of page disables minimal-ui #4

Open
gapipro opened this issue Nov 21, 2014 · 7 comments
Open

Clicking on bottom of page disables minimal-ui #4

gapipro opened this issue Nov 21, 2014 · 7 comments
Labels

Comments

@gapipro
Copy link

gapipro commented Nov 21, 2014

User drops out of 'minimal-ui' if he clicks on bottom of page.

Can this be prevented so sites can have theirs own bottom navigation?

I was testing this on iOS 8.1 and iOS 8.1.1

@gajus
Copy link
Owner

gajus commented Nov 21, 2014

The first thing to try is to catch all window click/touch events and preventDefault them. If that disables the described behavior, then yes, it would be possible to disable it.

On Nov 21, 2014, at 16:39, gapipro notifications@github.com wrote:

User drops out of 'minimal-ui' if he clicks on bottom of page.

Can this be prevented so sites can have theirs own bottom navigation?


Reply to this email directly or view it on GitHub.

@gapipro
Copy link
Author

gapipro commented Nov 24, 2014

Touch/click event is not triggered when tapping on bottom 20px.

Resize event is triggered but can't do much with it.

@gajus
Copy link
Owner

gajus commented Nov 24, 2014

This test prevents default of all events:

for (property in window) {
    if (property.indexOf('on') === 0) {
        (function (eventName) {
            window.addEventListener(eventName, function (e) {
                console.log(eventName);

                e.preventDefault();
            });
        } (property.substr(2)));
    }
}

Unfortunately, this does not prevent tapping the bottom of the screen to exit the minimal-ui.

@gajus gajus added the bug label Nov 24, 2014
@digitalmaster
Copy link

This is actually the main problem.. I'm less concerned about the lost vertical space than i am about this because if I pin anything near the bottom of the page users have to click twice each time (first one exits minimal view, and second actually clicks). I wish there was a way to pass this click event through so we don't have this horrible behavior.

Does anyone know why Apple would add this and then remove it?

@ginjo
Copy link

ginjo commented Jun 8, 2015

I don't have a problem with Brim, specifically, but a google search for this issue turned up surprisingly little of substance. This github thread is the only place I could find where the bottom-touch behavior, and its caveats, in ios 8 safari is described with any clarity.

I agree that this behavior in ios 8 is absolutely awful. Why would they force this on us? R.W. Emerson's quote about foolish consistency comes to mind.

Hoping the Brim project, or anyone really, will turn up a solution/workaround/hack of some sort.

@digitalmaster
Copy link

@ginjo ditto :(

@zomars
Copy link

zomars commented Feb 4, 2016

I think this is a browser level behavior, I don't think any JS or CSS can help up here. BTW I'm have the exact same issue, I guess I'm going to have to avoid bottom fixed nav bars for a while...

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

No branches or pull requests

5 participants