browserui/browser/BrowserAppSrc/BrowserContentViewContainer.cpp
changeset 15 e45c3f40ea5f
parent 10 57d5b8e231c4
child 19 16a119033e3e
equal deleted inserted replaced
10:57d5b8e231c4 15:e45c3f40ea5f
   201         {
   201         {
   202         return iGotoPane->OfferKeyEventL( aKeyEvent, aType );
   202         return iGotoPane->OfferKeyEventL( aKeyEvent, aType );
   203         }
   203         }
   204 
   204 
   205     TKeyEvent keyEvent( aKeyEvent );
   205     TKeyEvent keyEvent( aKeyEvent );
       
   206     TBrCtlDefs::TBrCtlElementType elementtype =
       
   207         iApiProvider.BrCtlInterface().FocusedElementType();
   206 
   208 
   207     // Don't allow virtual keyboard backspace key event to close the window
   209     // Don't allow virtual keyboard backspace key event to close the window
       
   210     // And don't close window if editing in an input box
   208     if ( !AknLayoutUtils::PenEnabled() && aType == EEventKey
   211     if ( !AknLayoutUtils::PenEnabled() && aType == EEventKey
   209         && keyEvent.iCode == EKeyBackspace )
   212         && keyEvent.iCode == EKeyBackspace
       
   213         && elementtype != TBrCtlDefs::EElementActivatedInputBox )
   210         {
   214         {
   211         if ( iApiProvider.Preferences().UiLocalFeatureSupported(
   215         if ( iApiProvider.Preferences().UiLocalFeatureSupported(
   212                                                     KBrowserMultipleWindows ) )
   216                                                     KBrowserMultipleWindows ) )
   213             {
   217             {
   214             TInt winCount = iApiProvider.WindowMgr().WindowCount();
   218             TInt winCount = iApiProvider.WindowMgr().WindowCount();
   273 
   277 
   274     if ( aType == EEventKey && keyEvent.iCode == EKeyOK )
   278     if ( aType == EEventKey && keyEvent.iCode == EKeyOK )
   275         {
   279         {
   276         if ( keyEvent.iRepeats && iSelectionKeyPressed )
   280         if ( keyEvent.iRepeats && iSelectionKeyPressed )
   277             {
   281             {
   278             TBrCtlDefs::TBrCtlElementType elementtype =
   282 
   279                 iApiProvider.BrCtlInterface().FocusedElementType();
       
   280             TInt command( KErrNotFound );
   283             TInt command( KErrNotFound );
   281             switch( elementtype )
   284             switch( elementtype )
   282                 {
   285                 {
   283                 case TBrCtlDefs::EElementAnchor:
   286                 case TBrCtlDefs::EElementAnchor:
   284                     {
   287                     {