Bug 1080030 - Trim the whitespace surrounding option/optgroup text when displaying a drop-down in e10s; r=felipe

This commit is contained in:
Ehsan Akhgari 2014-10-11 09:40:45 -04:00
parent ca5a951c0b
commit c44d1f9da5

View File

@ -92,8 +92,8 @@ function buildOptionListForChildren(node) {
if (child.tagName == 'OPTION' || child.tagName == 'OPTGROUP') {
let info = {
tagName: child.tagName,
textContent: child.tagName == 'OPTGROUP' ? child.getAttribute("label")
: child.textContent,
textContent: child.tagName == 'OPTGROUP' ? child.getAttribute("label").trim()
: child.textContent.trim(),
// XXX this uses a highlight color when this is the selected element.
// We need to suppress such highlighting in the content process to get
// the option's correct unhighlighted color here.