Mobile (iOS) fix for dismissing flashes
iOS devices don’t like listening to clicks on most objects. They typically prefer a and button objects. This fix replaces the #closeflash span with a link to “#” instead (while also inheriting text-decoration and color styling), so that mobile (iOS) devices will allow you to close the flash.
This commit is contained in:
@@ -563,7 +563,7 @@
|
||||
var flash = $('.w2p_flash');
|
||||
web2py.hide_flash();
|
||||
flash.html(message).addClass(status);
|
||||
if (flash.html()) flash.append('<span id="closeflash"> × </span>').slideDown();
|
||||
if (flash.html()) flash.append('<a id="closeflash" href="#" style="text-decoration: inherit; color: inherit;"> × </a>').slideDown();
|
||||
},
|
||||
hide_flash: function () {
|
||||
$('.w2p_flash').fadeOut(0).html('');
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
var flash = $('.w2p_flash');
|
||||
web2py.hide_flash();
|
||||
flash.html(message).addClass(status);
|
||||
if (flash.html()) flash.append('<span id="closeflash"> × </span>').slideDown();
|
||||
if (flash.html()) flash.append('<a id="closeflash" href="#" style="text-decoration: inherit; color: inherit;"> × </a>').slideDown();
|
||||
},
|
||||
hide_flash: function () {
|
||||
$('.w2p_flash').fadeOut(0).html('');
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
var flash = $('.w2p_flash');
|
||||
web2py.hide_flash();
|
||||
flash.html(message).addClass(status);
|
||||
if (flash.html()) flash.append('<span id="closeflash"> × </span>').slideDown();
|
||||
if (flash.html()) flash.append('<a id="closeflash" href="#" style="text-decoration: inherit; color: inherit;"> × </a>').slideDown();
|
||||
},
|
||||
hide_flash: function () {
|
||||
$('.w2p_flash').fadeOut(0).html('');
|
||||
|
||||
Reference in New Issue
Block a user