[Koha-patches] [PATCH] BUG9335 - humanMsg popups don't dissapear in webkit browsers

Martin Renvoize martin.renvoize at ptfs-europe.com
Mon Dec 31 17:56:35 CET 2012


The popup message that appears after saving changes to system
preferences should dissapear upon any user actions (i.e mouse
click, mouse move, typing) but this does not happen in modern
webkit based browsers since jQuery was updated.

This patch adds the suggested fix to the jQuery plugin code as
suggested on https://code.google.com/p/humanmsg/issues/detail?id=9
---
 koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/humanmsg.js |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/humanmsg.js b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/humanmsg.js
index af37c88..4a2d62c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/humanmsg.js
+++ b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/humanmsg.js
@@ -84,9 +84,9 @@ var humanMsg = {
 			.unbind('click', humanMsg.removeMsg)
 			.unbind('keypress', humanMsg.removeMsg)
 
-		// If message is fully transparent, fade it out
-		if (jQuery('#'+humanMsg.msgID).css('opacity') == humanMsg.msgOpacity)
-			jQuery('#'+humanMsg.msgID).animate({ opacity: 0 }, 500, function() { jQuery(this).hide() })
+                // If message is fully transparent, fade it out
+                if ( Math.abs(jQuery('#'+humanMsg.msgID).css('opacity') - humanMsg.msgOpacity ) < 0.00001 )
+                        jQuery('#'+humanMsg.msgID).animate({ opacity: 0 }, 500, function() { jQuery(this).hide() })
 	}
 };
 
-- 
1.7.10.4



More information about the Koha-patches mailing list