Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Fix for issue: #5183 - "Title attribute of a split button pulls in ex…
Browse files Browse the repository at this point in the history
…tra 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
  • Loading branch information
Keith Pepin committed Oct 16, 2012
1 parent 4d9575b commit b7da392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/widgets/listview.js
Expand Up @@ -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({
Expand Down

1 comment on commit b7da392

@KeithPepin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a typo when creating the fork and this Fix commit. Correct Issue number is #5182. Sorry for any confusion guys.

Please sign in to comment.