Hot module reload triggering twice on iOS Device seems to breaks to show keyboard

未关闭
#150 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
angular, ios, typescript
领域
mobile, tooling

调研方向

首先运行报告中的 ns run --device ... 命令,并将其输出和键盘行为与 --no-hmr 进行比较;检查项目的 package.json 和入口点 src/main.ts。当应用和 HMR 在 iOS 设备上成功启动一次,并且在启用 HMR 时 TextField 或 SearchBar 能够可靠地打开键盘,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

{
 "name": "mobile-app",
 "main": "./src/main.ts",
 "version": "1.0.0",
 "private": true,
 "dependencies": {
   "@angular/animations": "~19.0.0",
   "@angular/common": "~19.0.0",
   "@angular/compiler": "~19.0.0",
   "@angular/core": "~19.0.0",
   "@angular/forms": "~19.0.0",
   "@angular/platform-browser": "~19.0.0",
   "@angular/platform-browser-dynamic": "~19.0.0",
   "@angular/router": "~19.0.0",
   "@apollo/client": "^3.12.6",
   "@nativescript/angular": "^19.0.0",
   "@nativescript/core": "~8.8.0",
   "apollo-angular": "^8.0.0",
   "graphql": "^16.10.0",
   "rxjs": "~7.8.0",
   "zone.js": "~0.15.0"
 },
 "devDependencies": {
   "@angular-devkit/build-angular": "~19.0.0",
   "@angular/compiler-cli": "~19.0.0",
   "@nativescript/android": "8.8.6",
   "@nativescript/ios": "8.8.2",
   "@nativescript/tailwind": "^2.1.0",
   "@nativescript/types": "~8.8.0",
   "@nativescript/webpack": "~5.0.0",
   "@ngtools/webpack": "~19.0.0",
   "tailwindcss": "~3.4.0",
   "typescript": "~5.6.0"
 }
}

Describe the bug

When running on iOS It's observed that when an input such as TextField or SearchBar get focus the keyboard doesn't launch.

It been observed that the app launch twice as well as HMR triggering twice, the hmr appears to break the keyboard to launch.

To Reproduce

ns run --device xxxxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxxx

Restarting application on device xxxxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxxx...
  [HMR][11bea14ccf932a8eee02] boot | HMR Enabled - waiting for changes...
  Angular is running in development mode.
Successfully run application com.test.app on device with ID xxxxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxxx.
  [HMR][11bea14ccf932a8eee02] boot | HMR Enabled - waiting for changes...
  Angular is running in development mode.
  NativeScript debugger has opened inspector socket on port 18183 for com.test.app.
Successfully synced application com.test.app on device xxxxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxxx

Expected behavior
When click on TextField or SearchBar the keyboard should appears

Sample project

Additional context

The is issue is not found and the keyboard show when click on TextField or SearchBar when running with --no-hmr flag e.g: ns run --device xxxxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxxx --no-hmr It's aslo observed that the app and hmr only launch and print once

Restarting application on device xxxxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxxx...
  [HMR][672c06c86d338110b392] boot | HMR Enabled - waiting for changes...
Successfully synced application com.test.app on device xxxxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxxx.
  Angular is running in development mode.
主要语言
TypeScript
星标
55
派生
13
平均合并
16 分钟
30 天内合并 PR
1

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NativeScript/angular 的其他 Issue

查看 NativeScript/angular 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。