FIX: prevents &hellip from being displayed in title attribute
This commit is contained in:
parent
7232a6e5a9
commit
a45d8a69f9
|
@ -9,7 +9,7 @@ export default Ember.Component.extend({
|
|||
"tabindex",
|
||||
"ariaLabel:aria-label",
|
||||
"ariaHasPopup:aria-haspopup",
|
||||
"title",
|
||||
"sanitizedTitle:title",
|
||||
"value:data-value",
|
||||
"name:data-name",
|
||||
],
|
||||
|
@ -18,7 +18,7 @@ export default Ember.Component.extend({
|
|||
|
||||
ariaHasPopup: true,
|
||||
|
||||
ariaLabel: Ember.computed.or("computedContent.ariaLabel", "title"),
|
||||
ariaLabel: Ember.computed.or("computedContent.ariaLabel", "sanitizedTitle"),
|
||||
|
||||
@computed("computedContent.title", "name")
|
||||
title(computedContentTitle, name) {
|
||||
|
@ -28,6 +28,13 @@ export default Ember.Component.extend({
|
|||
return null;
|
||||
},
|
||||
|
||||
// this might need a more advanced solution
|
||||
// but atm it's the only case we have to handle
|
||||
@computed("title")
|
||||
sanitizedTitle(title) {
|
||||
return String(title).replace("…", "");
|
||||
},
|
||||
|
||||
label: Ember.computed.or("computedContent.label", "title", "name"),
|
||||
|
||||
name: Ember.computed.alias("computedContent.name"),
|
||||
|
|
Loading…
Reference in New Issue