From c4eea3abde487567961fccab0d0cafd8bd4a7718 Mon Sep 17 00:00:00 2001 From: pseidemann Date: Tue, 29 Jan 2013 22:54:00 +0100 Subject: don't remove title attribute for tooltips fixes #6445 --- js/bootstrap-tooltip.js | 2 +- js/tests/unit/bootstrap-tooltip.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index a08952a4cf..cd9cd09131 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -185,7 +185,7 @@ , fixTitle: function () { var $e = this.$element if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') } } diff --git a/js/tests/unit/bootstrap-tooltip.js b/js/tests/unit/bootstrap-tooltip.js index ba51347433..eb8beeb6f3 100644 --- a/js/tests/unit/bootstrap-tooltip.js +++ b/js/tests/unit/bootstrap-tooltip.js @@ -22,9 +22,9 @@ $(function () { ok(!!$.fn.tooltip.defaults, 'defaults is defined') }) - test("should remove title attribute", function () { + test("should empty title attribute", function () { var tooltip = $('').tooltip() - ok(!tooltip.attr('title'), 'title tag was removed') + ok(tooltip.attr('title') === '', 'title attribute was emptied') }) test("should add data attribute for referencing original title", function () { -- cgit v1.2.3