Bug 1301086 - about:home and about:newtab search submit label needs to be a left pointing triangle for RTL locales. r=mak

This commit is contained in:
Dão Gottwald 2016-09-09 17:18:57 +02:00
Родитель ee6b91ee10
Коммит 3fe7e2cb48
4 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -218,6 +218,11 @@ var gContentSearchController;
function setupSearch()
{
// Set submit button label for when CSS background are disabled (e.g.
// high contrast mode).
document.getElementById("searchSubmit").value =
document.body.getAttribute("dir") == "ltr" ? "\u25B6" : "\u25C0";
// The "autofocus" attribute doesn't focus the form element
// immediately when the element is first drawn, so the
// attribute is also used for styling when the page first loads.

Просмотреть файл

@ -44,7 +44,7 @@
<input type="text" name="q" value="" id="searchText" maxlength="256"
aria-label="&contentSearchInput.label;" autofocus="autofocus"
dir="auto"/>
<input id="searchSubmit" type="button" value="&#x25b6;" onclick="onSearchSubmit(event)"
<input id="searchSubmit" type="button" onclick="onSearchSubmit(event)"
title="&contentSearchSubmit.tooltip;"/>
</div>

Просмотреть файл

@ -71,7 +71,7 @@
<div id="newtab-search-icon"/>
<input type="text" name="q" value="" id="newtab-search-text"
aria-label="&contentSearchInput.label;" maxlength="256" dir="auto"/>
<input id="newtab-search-submit" type="button" value="&#x25b6;"
<input id="newtab-search-submit" type="button"
title="&contentSearchSubmit.tooltip;"/>
</div>
</div>

Просмотреть файл

@ -114,6 +114,11 @@ var gPage = {
this._initialized = true;
// Set submit button label for when CSS background are disabled (e.g.
// high contrast mode).
document.getElementById("newtab-search-submit").value =
document.body.getAttribute("dir") == "ltr" ? "\u25B6" : "\u25C0";
// Initialize search.
gSearch.init();