mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-02-12 01:30:38 +03:00
fixed links on firefox
This commit is contained in:
parent
218e4ae779
commit
68d3fd3be5
|
@ -1,5 +1,5 @@
|
||||||
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
|
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
|
||||||
/* globals CustomEvent */
|
/* globals CustomEvent, navigator */
|
||||||
var ripples = {
|
var ripples = {
|
||||||
init : function(withRipple) {
|
init : function(withRipple) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -56,6 +56,11 @@ var ripples = {
|
||||||
$ripple.className = "ripple ripple-on";
|
$ripple.className = "ripple ripple-on";
|
||||||
$ripple.setAttribute("style", $ripple.getAttribute("style") + ["-ms-" + scale,"-moz-" + scale,"-webkit-" + scale,scale].join(";"));
|
$ripple.setAttribute("style", $ripple.getAttribute("style") + ["-ms-" + scale,"-moz-" + scale,"-webkit-" + scale,scale].join(";"));
|
||||||
|
|
||||||
|
// Dirty fix for Firefox... seems like absolute elements inside <A> tags do not trigger the "click" event
|
||||||
|
if (/firefox/i.test(navigator.userAgent)) {
|
||||||
|
$el.click();
|
||||||
|
}
|
||||||
|
|
||||||
// This function is called when the animation is finished
|
// This function is called when the animation is finished
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
||||||
|
@ -73,7 +78,6 @@ var ripples = {
|
||||||
|
|
||||||
// Let ripple fade out (with CSS)
|
// Let ripple fade out (with CSS)
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$ripple.parentNode.parentNode.click();
|
|
||||||
$ripple.remove();
|
$ripple.remove();
|
||||||
}, rippleOutTime);
|
}, rippleOutTime);
|
||||||
};
|
};
|
||||||
|
@ -103,6 +107,7 @@ var ripples = {
|
||||||
// Events handler
|
// Events handler
|
||||||
// init RippleJS and start ripple effect on mousedown
|
// init RippleJS and start ripple effect on mousedown
|
||||||
bind("mousedown", withRipple, rippleInit);
|
bind("mousedown", withRipple, rippleInit);
|
||||||
|
|
||||||
// start ripple effect on mousedown
|
// start ripple effect on mousedown
|
||||||
bind("mousedown", ".ripple-wrapper, .ripple-wrapper .ripple", rippleStart);
|
bind("mousedown", ".ripple-wrapper, .ripple-wrapper .ripple", rippleStart);
|
||||||
// if animation ends and user is not holding mouse then destroy the ripple
|
// if animation ends and user is not holding mouse then destroy the ripple
|
||||||
|
|
Loading…
Reference in New Issue
Block a user