From 293d6212e88ece34d19f970714cccff03faddf7f Mon Sep 17 00:00:00 2001 From: Mohammad Younes Date: Tue, 17 Dec 2013 15:19:15 +0300 Subject: [PATCH] Fix #422 - Hide native browser tooltip --- src/modules/popup.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/modules/popup.js b/src/modules/popup.js index a609457ef..a4c6be33a 100755 --- a/src/modules/popup.js +++ b/src/modules/popup.js @@ -159,6 +159,7 @@ $.fn.popup = function(parameters) { content : content }); } + module.save.conditions(); $popup = $('
') .addClass(className.popup) .addClass(variation) @@ -214,6 +215,7 @@ $.fn.popup = function(parameters) { $module .removeClass(className.visible) ; + module.restore.conditions(); module.unbind.close(); if( module.is.visible() ) { module.animate.hide(callback); @@ -250,6 +252,29 @@ $.fn.popup = function(parameters) { ; }, + save: { + conditions: function () { + module.cache = { + title: $module.attr('title') + }; + if (module.cache.title) { + $module.attr('title', ''); + } + module.verbose('Saving original attributes', module.cache); + } + }, + restore: { + conditions: function () { + if (typeof module.cache === undefined) { + module.error(error.cache); + return false; + } + if (module.cache.title) { + $module.attr('title', module.cache.title); + } + module.verbose('Restoring original attributes', module.cache); + } + }, animate: { show: function(callback) { callback = callback || function(){};