bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Cannot close 'Alerts' on a touch screen device

Open tkompare opened this issue 14 years ago • 10 comments

I cannot close alerts on a iPhone 4S.

An example can be duplicated on http://twitter.github.com/bootstrap/components#alerts

tkompare avatar Mar 18 '12 02:03 tkompare

ah another component that could use some mobile support. let me look into it as I just finished overhauling the carousel.

ctalkington avatar Mar 18 '12 18:03 ctalkington

ok, while I don't have an iPhone, I was able to click the little x from my android and it closes, just really sensitive, due to size I think.

ctalkington avatar Mar 18 '12 18:03 ctalkington

I can close them now. Yeah that little X is a small sucker, but works as expected on iP4s iOS 5.

ibrent avatar Mar 18 '12 21:03 ibrent

ibrent: Do you have a test page for Alerts that you were able to close with a touch? I'm still unable to close the ones on http://twitter.github.com/bootstrap/components#alerts from my iPhone 4S iOS v5.1(9B179). I keep tapping and tapping on them with no results.

tkompare avatar Mar 18 '12 21:03 tkompare

I doubt this help anything other than my sanity:

If I add a jQuery listener to the 'close' alert tag, I can fire that listener just fine. So its not my tapping in the wrong spot on my physical iPhone and iOS Simulator that is in error.

<div id="alert" class="alert">
  <a id="close" class="close" data-dismiss="alert">×</a>
    <strong>Warning!</strong> Stern warning!
</div>
$('#close').click(function(){
  $('#alert').hide();
});

tkompare avatar Mar 18 '12 22:03 tkompare

I have only been doing local dev, but yeah, I have used Chris' test URL and it works: http://bootstrap.simplydev.com/javascript.html#alerts

Try the in-page alerts and close them. I can close and make all the js widgets work with my iP4s iOS 5.0.1

ibrent avatar Mar 19 '12 03:03 ibrent

i think something is up with the project GH page, be it not updated or what but @ibrent also pointed out that responsive images work on my dev site and not the project GH page. when all i simply did was push a 2.0.2 release of docs to it.

Edit: responsive images have to with CSS that was added in docs.css, which should be removed IMHO, and use core classes.

ctalkington avatar Mar 19 '12 03:03 ctalkington

I can close alerts on http://bootstrap.simplydev.com/javascript.html#alerts with my iPhone 4S iOS v5.1(9B179), but definitely not on http://twitter.github.com/bootstrap/components#alerts.

tkompare avatar Mar 19 '12 21:03 tkompare

Resolved in 2.0.3-wip. Looks like iOS needs an href="#", which components did not have, but the JS docs did. I've changed all the alert close icons to button instead to resolve the issue entirely, but both options are valid.

mdo avatar Mar 26 '12 03:03 mdo

thanks @markdotto , adding href="#" worked :)

richlewis14 avatar Oct 09 '12 19:10 richlewis14