[Title] Fix clearing text issue of email composer
[Issue#] N/A
[Problem] Text was cleared after to tap enter key.
[Cause] IMF callback was called without filtering.
[Solution] Also handle IMF callback if no filtering.
Change-Id: I8799a9f1119e095a503de0dcc0af36ff86465cd9
static bool handleKeyPressCommands(WebPage* page, KeyboardEvent* event)
{
const NativeWebKeyboardEvent* currentEvent = static_cast<const NativeWebKeyboardEvent*>(WebPage::currentEvent());
- if (!currentEvent || !currentEvent->isFiltered())
- return false;
+ bool isFiltered = (currentEvent && currentEvent->isFiltered());
if (event->type() != eventNames().keypressEvent)
- return true;
+ return isFiltered;
Vector<OwnPtr<KeyPressCommand> > commands;
page->swapKeyPressCommands(commands);
size_t size = commands.size();
if (!size)
- return true;
+ return isFiltered;
for (size_t i = 0; i < size; ++i) {
switch (commands[i]->type) {
event->setDefaultHandled();
- return true;
+ return isFiltered;
}
#endif