[Title] revise hardware backkey eventHandler to identify the event keyName "bac$
authorJoonghun Park <jh718.park@samsung.com>
Thu, 20 Jun 2013 13:53:39 +0000 (22:53 +0900)
committerJoonghun Park <jh718.park@samsung.com>
Fri, 21 Jun 2013 00:05:04 +0000 (09:05 +0900)
[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: I5d3dd7ea157bdc2f14ed5a117d85c2a9b92af9f3

js/main.js

index 1a7a7af..766bc04 100755 (executable)
@@ -303,8 +303,9 @@ function webAudioInit() {
 \r
 window.onload = function () { \r
     //add eventListener for tizenhwkey\r
-    document.addEventListener('tizenhwkey', function(e){\r
-        tizen.application.getCurrentApplication().exit();\r
+    document.addEventListener('tizenhwkey', function(e) {\r
+        if(e.keyName == "back")\r
+            tizen.application.getCurrentApplication().exit();\r
     });\r
 \r
     webAudioInit(); \r