[NextBrowser] Enable remocon click on PWA and incognito windows 04/318804/2 submit/tizen/20241008.160013
authormayur.jain <mayur.jain@samsung.com>
Tue, 8 Oct 2024 11:58:05 +0000 (17:28 +0530)
committerBot Blink <blinkbot@samsung.com>
Tue, 8 Oct 2024 13:09:35 +0000 (13:09 +0000)
-Currently window gets focused out on PWA and incognito
 windows.
-Generate mouse left click on remocon return if window
 focus out case

Change-Id: I3e07694416e6073a0a2d5f2ec3512b0aab61ac4b
Signed-off-by: mayur.jain <mayur.jain@samsung.com>
chrome/browser/ui/samsung/hybrid_navigation_controller.cc

index 412bc322b9f8587a28fef86287702789807bf508..1ed6eb81d675939883dde8f896d6b6ad32fb63a4 100644 (file)
@@ -206,7 +206,10 @@ bool HybridNavigationController::KeyEvent(
       FixPointerMove(key, 30);
       return true;
     } else if (!keynameReturn.compare(key)) {
-      LOG(INFO) << "return press on window focus out, passing event";
+      LOG(INFO) << "Generating left click";
+      cursor_controller->GenerateMouseClick(
+          samsung_browser_main::MouseButtonCode::LEFT_BTN,
+          samsung_browser_main::FakeMouseEventType::PressPlusRelease);
       is_return_press_passed_ = true;
       return false;
     }
@@ -358,6 +361,7 @@ bool HybridNavigationController::KeyEvent(
           !is_window_focused_) {  // if menu tree or context
                                   // menu need to pass event
         LOG(INFO) << "Menu tree or context menu case need to pass event";
+        is_return_press_passed_ = false;
         return false;
       }
       if (is_return_press_passed_) {