mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 602130 - Caret positioned incorrectly in input[type=text] when hidden and redisplayed; r=bzbarsky a=blocking-final+
--HG-- extra : rebase_source : 673601ada34f5d1eefc61303f7420dd74363e2b3
This commit is contained in:
parent
df16cbf877
commit
cc3a98796c
@ -1145,9 +1145,9 @@ nsTextEditorState::PrepareEditor(const nsAString *aValue)
|
||||
rv = mBoundFrame->UpdateValueDisplay(PR_FALSE, PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else {
|
||||
if (aValue) {
|
||||
if (aValue || !mEditorInitialized) {
|
||||
// Set the correct value in the root node
|
||||
rv = mBoundFrame->UpdateValueDisplay(PR_TRUE, PR_FALSE, aValue);
|
||||
rv = mBoundFrame->UpdateValueDisplay(PR_TRUE, !mEditorInitialized, aValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
|
6
layout/reftests/editor/caret_after_reframe-ref.html
Normal file
6
layout/reftests/editor/caret_after_reframe-ref.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<input autofocus style="display:block">
|
||||
</body>
|
||||
</html>
|
14
layout/reftests/editor/caret_after_reframe.html
Normal file
14
layout/reftests/editor/caret_after_reframe.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<body>
|
||||
<input onfocus="focused()" autofocus>
|
||||
<script>
|
||||
function focused() {
|
||||
var i = document.querySelector("input");
|
||||
i.style.display = "block";
|
||||
document.offsetWidth;
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -21,3 +21,4 @@ include xul/reftest.list
|
||||
!= caret_on_textarea_lastline.html caret_on_textarea_lastline-ref.html
|
||||
== input-text-onfocus-reframe.html input-text-onfocus-reframe-ref.html
|
||||
== input-text-notheme-onfocus-reframe.html input-text-notheme-onfocus-reframe-ref.html
|
||||
== caret_after_reframe.html caret_after_reframe-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user