You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native WebView在iOS 17下希伯来语(RTL)内容显示为镜像文字问题求助

React Native WebView在iOS 17下希伯来语(RTL)内容显示为镜像文字问题求助

大家好,我遇到了一个十分棘手的问题:我开发的React Native应用中嵌入了WebView组件,加载的是希伯来语(属于从右到左的RTL语言)内容,但在iOS 17系统上出现了异常显示情况:

  • 下拉选择框的内容呈现镜像文字
  • 文件选择对话框整体是镜像显示状态
  • 长按输入框时,相关交互内容也变成了镜像样式

这个问题在其他iOS版本上都没有复现,我已经附上了对应场景的截图:输入文本镜像显示、文件选择对话框镜像显示、选择框内容镜像显示。

以下是我当前使用的React Native WebView代码:

<WebView 
  ref={webViewRef} 
  source={{ 
    html: `<!DOCTYPE html>
<html dir="rtl" lang="he">
<head>
<meta charset="utf-8">
</head>
<body>
<h1>דף נסיון</h1>
<p>דוגמא לקומבו</p>
<form action="/action_page.php">
<label for=”cars">בחר צבע</label>
<select name="cars" id="cars">
<option value="volvo">ירוק</option>
<option value="saab">כחול</option>
<option value="opel">אדום</option>
<option value="audi">צהוב</option>
</select>
<br><br>
<label for=”myfile">דוגמא לקובץ</label>
<br><br>
<input type="file" id="myfile" name=“myfile">
<br><br>
<label for=”text1">דוגמא לטקסט</label>
<br><br>
<input type="text" id="text1" name="text1" placeholder="נסיון">
<br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>` 
  }} 
  onError={onWebViewError} 
  onLoadStart={onWebViewLoadStart} 
  onLoadEnd={onWebViewLoadEnd}
  onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} 
  originWhitelist={['http://*', 'https://*', 'intent://*', 'tel:*', 'WebBrowser:*', 'webbrowser:*']}
  onNavigationStateChange={(navState) => { setCanGoBack(navState.canGoBack) }} 
  sharedCookiesEnabled={true}
  mediaPlaybackRequiresUserAction={false} 
  javaScriptEnabled={true} 
  nativeConfig={{props: {webContentsDebuggingEnabled: true}}}
/>

有没有朋友遇到过类似的iOS 17 WebView RTL兼容问题?或者有什么可行的解决方案可以分享?麻烦大家帮忙指点一下,非常感谢!

备注:内容来源于stack exchange,提问作者Riv

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 07:54:28