Bug 574820 - URL and Placeholders (e.g. "Go to a Web Site") show at same time in Location Bar after closing Print Preview; r=roc

This commit is contained in:
Ehsan Akhgari 2010-07-13 22:00:57 -04:00
parent 7b9a212475
commit 53aff51b8b
4 changed files with 30 additions and 1 deletions

View File

@ -1126,7 +1126,7 @@ nsTextEditorState::PrepareEditor(const nsAString *aValue)
} else {
if (aValue) {
// Set the correct value in the root node
rv = mBoundFrame->UpdateValueDisplay(PR_FALSE, PR_FALSE, aValue);
rv = mBoundFrame->UpdateValueDisplay(PR_TRUE, PR_FALSE, aValue);
NS_ENSURE_SUCCESS(rv, rv);
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="reftest-wait">
<script type="text/javascript"><![CDATA[
window.addEventListener("load", function() {
var x = document.getElementById("x");
x.value = "val";
x.focus();x.blur();
setTimeout(function() {
x.value = "";
x.hidden = true;
setTimeout(function() {
x.value = "value";
x.hidden = false;
x.focus();x.blur();
document.documentElement.removeAttribute("class");
}, 0);
}, 0);
}, false);
]]></script>
<textbox id="x" placeholder="placeholder"/>
</window>

View File

@ -0,0 +1,5 @@
<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<textbox placeholder="placeholder" value="value"/>
</window>

View File

@ -19,3 +19,4 @@
== placeholder-16.html placeholder-focus-ref.html
== placeholder-17.html placeholder-focus-ref.html
== placeholder-18.html placeholder-overridden-ref.html
== placeholder-19.xul placeholder-overridden-ref.xul