Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
xugenyuan
2024-09-24 17:52:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5fb0a35dc9350ddb6def118afd0341d71d659e93
5fb0a35d
1 parent
24491c47
ref |> 按华为沟通结论,调整评论输入框键盘消失方法
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
View file @
5fb0a35
import { inputMethodEngine } from '@kit.IMEKit'
import { inputMethod
, inputMethod
Engine } from '@kit.IMEKit'
import { commentInfo } from 'wdBean/Index'
import { VoiceRecoginizer } from 'wdHwAbility'
import { Logger, ToastUtils } from 'wdKit/Index'
...
...
@@ -8,6 +8,7 @@ import { publishCommentModel } from '../model/PublishCommentModel'
import commentViewModel from '../viewmodel/CommentViewModel'
import { VoiceInputView } from './VoiceInputView'
import { common, UIAbility } from '@kit.AbilityKit'
import { BusinessError } from '@kit.BasicServicesKit'
const TAG = "CommentInputDialog"
...
...
@@ -154,7 +155,19 @@ export struct CommentCustomDialog {
this.voiceSwitch = !this.voiceSwitch
this.emojiSwitch = false
if (this.voiceSwitch) {
this.textInputController.stopEditing()
// 按沟通结果,调整隐藏键盘方法
// http://192.168.1.3:8080/zentao/bug-view-20473.html
// this.textInputController.stopEditing()
inputMethod.getController().hideTextInput((err: BusinessError) => {
if (err) {
console.error(`Failed to hideTextInput: ${JSON.stringify(err)}`);
return;
}
// console.log('Succeeded in hiding text input.');
})
// this.showKeyboardOnFocus = false
// focusControl.requestFocus("textAreaId") // 弹起键盘
} else {
focusControl.requestFocus("textAreaId") // 弹起键盘
// this.textInputController.caretPosition(this.textInputController.getTextContentRect().x)
...
...
@@ -170,7 +183,16 @@ export struct CommentCustomDialog {
this.emojiSwitch = !this.emojiSwitch
this.voiceSwitch = false
if (this.emojiSwitch) {
this.textInputController.stopEditing()
// 按沟通结果,调整隐藏键盘方法
// http://192.168.1.3:8080/zentao/bug-view-20473.html
// this.textInputController.stopEditing()
inputMethod.getController().hideTextInput((err: BusinessError) => {
if (err) {
console.error(`Failed to hideTextInput: ${JSON.stringify(err)}`);
return;
}
// console.log('Succeeded in hiding text input.');
})
} else {
focusControl.requestFocus("textAreaId") // 弹起键盘
// this.textInputController.caretPosition(this.textInputController.getTextContentRect().x)
...
...
Please
register
or
login
to post a comment