Commit c8874ff2 authored by Mark Otto's avatar Mark Otto

Merge pull request #6813 from Yohn/patch-12

don't remove title attribute for tooltips for 2.3-wip
parents 2fa77bf1 60c9ff43
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
, fixTitle: function () { , fixTitle: function () {
var $e = this.$element var $e = this.$element
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { 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', '')
} }
} }
......
...@@ -22,9 +22,9 @@ $(function () { ...@@ -22,9 +22,9 @@ $(function () {
ok(!!$.fn.tooltip.defaults, 'defaults is defined') ok(!!$.fn.tooltip.defaults, 'defaults is defined')
}) })
test("should remove title attribute", function () { test("should empty title attribute", function () {
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').tooltip() var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').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 () { test("should add data attribute for referencing original title", function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment