This repository was archived by the owner on Nov 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
harmony/rn_webview/src/main/ets Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ export struct RNCWebView {
428428 Web({ src: "", controller: this.controller, renderMode: this.renderMode })
429429 .mixedMode(this.mode)
430430 .onPermissionRequest((event: OnPermissionRequestEvent) => {
431- if (event) {
431+ if (event && (this.getPermissionDialogMessage(event) != "TYPE_SENSOR") ) {
432432 AlertDialog.show({
433433 title: this.resourceToString($r('app.string.on_confirm')) + event.request.getOrigin(),
434434 message: this.getPermissionDialogMessage(event),
@@ -463,6 +463,7 @@ export struct RNCWebView {
463463 .verticalScrollBarAccess(this.descriptorWrapper.rawProps.showsVerticalScrollIndicator)
464464 .overviewModeAccess(this.descriptorWrapper.rawProps.scalesPageToFit)
465465 .textZoomRatio(this.descriptorWrapper.rawProps.textZoom)
466+ .backgroundColor(BaseOperate.getColorMode(this.ctx.uiAbilityContext, this.descriptorWrapper.rawProps.forceDarkOn) === WebDarkMode.On ? Color.White : Color.Transparent)
466467 .darkMode(BaseOperate.getColorMode(this.ctx.uiAbilityContext, this.descriptorWrapper.rawProps.forceDarkOn))
467468 .forceDarkAccess(this.forceDark)
468469 .cacheMode(this.cacheMode)
You can’t perform that action at this time.
0 commit comments