285 { |
285 { |
286 if ( iFocused == iMessageField ) |
286 if ( iFocused == iMessageField ) |
287 { |
287 { |
288 iFocused = iHeader; |
288 iFocused = iHeader; |
289 iHeader->SetFocus( ETrue,EDrawNow ); |
289 iHeader->SetFocus( ETrue,EDrawNow ); |
|
290 iMessageField->ClearSelectionL(); |
290 iMessageField->SetFocus( EFalse, EDrawNow ); |
291 iMessageField->SetFocus( EFalse, EDrawNow ); |
291 iHeader->MakeVisible( ETrue ); |
292 iHeader->MakeVisible( ETrue ); |
292 CommitL( EBodyField ); |
293 CommitL( EBodyField ); |
293 iView.HandleContainerChangeRequiringToolbarRefresh(); |
294 iView.HandleContainerChangeRequiringToolbarRefresh(); |
294 } |
295 } |
423 { |
424 { |
424 // unknown event, ignored |
425 // unknown event, ignored |
425 break; |
426 break; |
426 } |
427 } |
427 } |
428 } |
|
429 |
|
430 if( iFocused == iMessageField ) |
|
431 { |
|
432 iMessageField->HandleTextChangedL(); |
|
433 } |
428 |
434 |
429 if ( aPointerEvent.iType == TPointerEvent::EButton1Down && |
435 if ( aPointerEvent.iType == TPointerEvent::EButton1Down && |
430 iHeader->NeedsLongTapL( aPointerEvent.iPosition ) ) |
436 iHeader->NeedsLongTapL( aPointerEvent.iPosition ) ) |
431 { |
437 { |
432 iLongTapDetector->PointerEventL( aPointerEvent ); |
438 iLongTapDetector->PointerEventL( aPointerEvent ); |
503 } |
509 } |
504 |
510 |
505 if ( ret == EKeyWasNotConsumed ) |
511 if ( ret == EKeyWasNotConsumed ) |
506 { |
512 { |
507 ret = iFocused->OfferKeyEventL( aKeyEvent, aType ); |
513 ret = iFocused->OfferKeyEventL( aKeyEvent, aType ); |
508 |
514 if( aType == EEventKeyUp ) |
|
515 iView.HandleContainerChangeRequiringToolbarRefresh(); |
|
516 |
509 // Report user activity to auto saver if editor field handled the |
517 // Report user activity to auto saver if editor field handled the |
510 // event. In case of message field (body text), EKeyWasConsumed |
518 // event. In case of message field (body text), EKeyWasConsumed |
511 // condition does not come true because AknFep consumes EKeyEvent |
519 // condition does not come true because AknFep consumes EKeyEvent |
512 // and calls HandleEdwinEventL. This OfferKeyEventL gets only |
520 // and calls HandleEdwinEventL. This OfferKeyEventL gets only |
513 // EEventKeyUp and EEventKeyDown events. Thus, when typing body text, |
521 // EEventKeyUp and EEventKeyDown events. Thus, when typing body text, |
514 // autosaver is notified in HandleEdwinEventL() |
522 // autosaver is notified in HandleEdwinEventL() |
515 if ( ( ret == EKeyWasConsumed ) && ( iFocused != iMessageField ) ) |
523 if ( ( ret == EKeyWasConsumed ) && ( iFocused != iMessageField ) ) |
516 { |
524 { |
517 iView.HandleContainerChangeRequiringToolbarRefresh(); |
|
518 iAutoSaver.ReportActivity(); |
525 iAutoSaver.ReportActivity(); |
519 } |
526 } |
520 } |
527 } |
521 |
528 |
522 return ret; |
529 return ret; |