From b7da392ae15b3562579d92365b8d18cf27d53fd7 Mon Sep 17 00:00:00 2001 From: Keith Pepin Date: Tue, 16 Oct 2012 16:40:00 -0400 Subject: [PATCH] Fix for issue: #5183 - "Title attribute of a split button pulls in extra spaces" Cause: entire text node is copied for the title attribute, including any leading or trailing spaces. Solution: Apply $.trim() to the text node value before assigning to the title attribute. Files Impacted: listview.js --- js/widgets/listview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/widgets/listview.js b/js/widgets/listview.js index 8d432ca3d28..664b7abb338 100644 --- a/js/widgets/listview.js +++ b/js/widgets/listview.js @@ -231,7 +231,7 @@ $.widget( "mobile.listview", $.mobile.widget, { linkIcon = last.jqmData( "icon" ); last.appendTo( item ) - .attr( "title", last.getEncodedText() ) + .attr( "title", $.trim(last.getEncodedText()) ) .addClass( "ui-li-link-alt" ) .empty() .buttonMarkup({