зеркало из https://github.com/mozilla/gecko-dev.git
Bug 717147 input events which are fired after compositionupdate should be trusted events r=ehsan
This commit is contained in:
Родитель
869d9bd043
Коммит
2220432bf7
|
@ -647,6 +647,10 @@ nsEditorEventListener::HandleText(nsIDOMEvent* aTextEvent)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Transfer the event's trusted-ness to our editor
|
||||||
|
nsCOMPtr<nsIDOMNSEvent> NSEvent = do_QueryInterface(aTextEvent);
|
||||||
|
nsAutoEditorKeypressOperation operation(mEditor, NSEvent);
|
||||||
|
|
||||||
return mEditor->UpdateIMEComposition(composedText, textRangeList);
|
return mEditor->UpdateIMEComposition(composedText, textRangeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ function startTests()
|
||||||
},
|
},
|
||||||
"caret": { "start": 1, "length": 0 }
|
"caret": { "start": 1, "length": 0 }
|
||||||
});
|
});
|
||||||
checkCompositionEvents(false, false, true, false, "composing");
|
checkCompositionEvents(false, false, true, true, "composing");
|
||||||
var queryText = synthesizeQueryTextContent(0, 100);
|
var queryText = synthesizeQueryTextContent(0, 100);
|
||||||
ok(queryText, "query text event result is null");
|
ok(queryText, "query text event result is null");
|
||||||
if (!queryText) {
|
if (!queryText) {
|
||||||
|
|
|
@ -1240,6 +1240,7 @@ function runCompositionEventTest()
|
||||||
|
|
||||||
function formEventHandlerForWindow(aEvent)
|
function formEventHandlerForWindow(aEvent)
|
||||||
{
|
{
|
||||||
|
ok(aEvent.isTrusted, "input events must be trusted events");
|
||||||
windowEventCounts[aEvent.type]++;
|
windowEventCounts[aEvent.type]++;
|
||||||
windowEventData[aEvent.type] = input.value;
|
windowEventData[aEvent.type] = input.value;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче