From: Joonghun Park Date: Thu, 20 Jun 2013 13:54:12 +0000 (+0900) Subject: [Title] revise hardware backkey eventHandler to identify the event keyName "bac$ X-Git-Tag: 2.2_release~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=321417c28b3b1d272a07fa0dbb0266a0c40d5d52;hp=ce1cb85be9dfe173ba6564ccf79ec3753dada7cd;p=samples%2Fweb%2FImageRotation.git [Title] revise hardware backkey eventHandler to identify the event keyName "bac$ [issue#]N_SE-42328, N_SE-42377, N_SE-42385 [Problem] when menu key is clicked, the app act as if back key is clicked [solution] add the checking code of hardware backkey event's keyName attribute Change-Id: I0d31d80fea425c27318d29b9bdc1cfd4b6f67eaa --- diff --git a/js/main.js b/js/main.js index c805245..8d8ec34 100755 --- a/js/main.js +++ b/js/main.js @@ -22,8 +22,9 @@ function deviceOrientationEvents() { window.onload = function() { //add eventListener for tizenhwkey - document.addEventListener('tizenhwkey', function(e){ - tizen.application.getCurrentApplication().exit(); + document.addEventListener('tizenhwkey', function(e) { + if(e.keyName == "back") + tizen.application.getCurrentApplication().exit(); }); deviceOrientationEvents();