Skip to content

Commit b7da392

Browse files
author
Keith Pepin
committed
Fix for issue: jquery-archive#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
1 parent 4d9575b commit b7da392

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/widgets/listview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
231231
linkIcon = last.jqmData( "icon" );
232232

233233
last.appendTo( item )
234-
.attr( "title", last.getEncodedText() )
234+
.attr( "title", $.trim(last.getEncodedText()) )
235235
.addClass( "ui-li-link-alt" )
236236
.empty()
237237
.buttonMarkup({

0 commit comments

Comments
 (0)