equal
deleted
inserted
replaced
205 TKeyEvent keyEvent( aKeyEvent ); |
205 TKeyEvent keyEvent( aKeyEvent ); |
206 TBrCtlDefs::TBrCtlElementType elementtype = |
206 TBrCtlDefs::TBrCtlElementType elementtype = |
207 iApiProvider.BrCtlInterface().FocusedElementType(); |
207 iApiProvider.BrCtlInterface().FocusedElementType(); |
208 |
208 |
209 // 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 |
210 // And don't close window if editing in an input box or textarea input |
211 if ( !AknLayoutUtils::PenEnabled() && aType == EEventKey |
211 if ( !AknLayoutUtils::PenEnabled() && aType == EEventKey |
212 && keyEvent.iCode == EKeyBackspace |
212 && keyEvent.iCode == EKeyBackspace |
213 && elementtype != TBrCtlDefs::EElementActivatedInputBox ) |
213 && elementtype != TBrCtlDefs::EElementActivatedInputBox |
|
214 && elementtype != TBrCtlDefs::EElementTextAreaBox ) |
214 { |
215 { |
215 if ( iApiProvider.Preferences().UiLocalFeatureSupported( |
216 if ( iApiProvider.Preferences().UiLocalFeatureSupported( |
216 KBrowserMultipleWindows ) ) |
217 KBrowserMultipleWindows ) ) |
217 { |
218 { |
218 TInt winCount = iApiProvider.WindowMgr().WindowCount(); |
219 TInt winCount = iApiProvider.WindowMgr().WindowCount(); |
268 // Web Engine opens the highlighted link into a new window. (long press) |
269 // Web Engine opens the highlighted link into a new window. (long press) |
269 // Currently the option is disabled and the link is opened in the same window |
270 // Currently the option is disabled and the link is opened in the same window |
270 // The commented part below enables the "Open link in new window" option on long press. |
271 // The commented part below enables the "Open link in new window" option on long press. |
271 // UI change request AHUN-6U3NT4, S60 bug AHUN-6UYT6N |
272 // UI change request AHUN-6U3NT4, S60 bug AHUN-6UYT6N |
272 |
273 |
273 if ( aType == EEventKey && keyEvent.iCode == EKeyOK ) |
274 TBool aEnterKeyForLinksActivation = (keyEvent.iCode == EKeyEnter) && |
|
275 (iApiProvider.Preferences().EnterKeyMode() == TBrCtlDefs::EEnterKeyCanActivateLink); |
|
276 if ( aType == EEventKey && |
|
277 (keyEvent.iCode == EKeyOK || aEnterKeyForLinksActivation) ) |
274 { |
278 { |
275 if ( keyEvent.iRepeats && iSelectionKeyPressed ) |
279 if ( keyEvent.iRepeats && iSelectionKeyPressed ) |
276 { |
280 { |
277 |
281 |
278 TInt command( KErrNotFound ); |
282 TInt command( KErrNotFound ); |
299 } |
303 } |
300 } |
304 } |
301 } |
305 } |
302 |
306 |
303 // stop the event handling when find item was actived |
307 // stop the event handling when find item was actived |
304 if ( (keyEvent.iScanCode == EStdKeyDevice3 || keyEvent.iScanCode == EStdKeyXXX) |
308 if ( (keyEvent.iScanCode == EStdKeyDevice3 || |
|
309 keyEvent.iScanCode == EStdKeyXXX || |
|
310 aEnterKeyForLinksActivation) |
305 && aType == EEventKeyDown && !iView->FindItemIsInProgress() ) |
311 && aType == EEventKeyDown && !iView->FindItemIsInProgress() ) |
306 { |
312 { |
307 iSelectionKeyPressed = ETrue; |
313 iSelectionKeyPressed = ETrue; |
308 keyEvent.iCode = EKeyNull; |
314 keyEvent.iCode = EKeyNull; |
309 } |
315 } |