问题标签 [chrome-ios]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
184 浏览

html - iOS 版 Chrome 输入元素中的可搜索占位符

有没有办法允许用户使用“在页面中查找”浏览器功能搜索占位符文本?

我知道我可以添加包含占位符文本的零高度元素,但这似乎是一个 hacky 解决方案。也许使用 CSS 伪类的东西?

编辑:我应该提一下,到目前为止,这只是 Chrome for iOS(10.0.2) 上的一个问题

代码很简单:

<input type="text" placeholder="First Name">

这是 Chrome 的屏幕截图: iOS 页面中的 chrome 查找

这就是我搜索“第一”时得到的结果

铬失败

0 投票
1 回答
1174 浏览

ios - three.js preserveDrawingBuffer 在 iOS 上不起作用

我正在渲染一个留下痕迹的粒子系统。它适用于除 iOS 之外的所有浏览器,包括 safari 和 chrome。粒子移动,但画布似乎在每一帧上都被清除,这意味着只能看到当前粒子而不是历史。

我在渲染选项中将 preserveDrawingBuffer 设置为 true,因此不应清除画布。

我是否缺少特定于 iOS 的特定命令?

0 投票
1 回答
1678 浏览

ios - iOS 上的 Material Design Lite 和 dialog-polyfill 模态对话框

我将 Material Design Lite ( http://getmdl.io ) 和 dialog-polyfill ( https://github.com/GoogleChrome/dialog-polyfill ) 一起用于模态对话框。

在我的桌面浏览器(Chrome、Safari 等)上一切正常,但在 iOS(Chrome 和 Safari)上,我无法在模式对话框内点击。它只是没有反应。

我已经尝试过在几个地方发布的建议,将“光标:指针”放在 CSS 中,但要么我没有正确执行,要么它不起作用。

这是我的代码中的典型模式对话框:

0 投票
0 回答
643 浏览

ios - iOS:从 Web 应用程序访问适用于 iOS 的 Chrome 上的“扫描 QR 码”功能

我想从移动设备浏览器上的 Web 应用程序扫描二维码。现在,我正在使用getUserMediaAPI 来获取视频流和用于解码的 JS 库,它非常适用于 Android 上的 chrome,但不适用于 iOS,因为 iOS 不支持 getUserMedia API。

我在这里读到Chrome for iOS 现在带有内置的二维码扫描器。如果我可以通过一些 JavaScript API(如导航器对象等)访问该功能,这可能会解决我的问题。

在这里的任何帮助将不胜感激。

我知道有一种解决方法可<input type="file" accept="image/*">用于捕获图像然后对其进行解码。但这有更高的解码失败机会,而不是一个好的用户体验。

0 投票
1 回答
7209 浏览

ios - iOS 上的所有浏览器都使用 WKWebview 还是 UIWebVIew?

我对iOS上的第三方浏览器(Chrome或FireFox)很好奇</p>

他们是否都使用WkWebvieworUIWebVIew来显示网页,但做了很多额外的工作,比如缓存等?

那么,如果我想在iOS上写一个浏览器,我必须用WkWebview它来显示网页并包装它来做更多的事情?</p>

0 投票
0 回答
161 浏览

javascript - Chrome iOS 中的伪全屏已修复

在以前的 Chrome 版本中,可以通过请求用户滚动内容来创建伪全屏效果,该效果在用户会话期间保留(直到用户向上滚动或以其他方式与浏览器 chrome 交互)。然后,这将最大限度地减少向用户显示的 chrome (ui) 数量,从而提供额外的视口空间来查看内容。

如果用户导航到另一个页面,则 chrome 将继续以其缩小状态显示。

在与我合作的公司中,我们将其用于基于 Web 的杂志阅读器,效果非常好,它会填满整个屏幕(无滚动),并针对较小的视口进行了优化。用户可以按下一个按钮,该按钮将显示一个可滚动的叠加层,该叠加层将在用户滚动内容后隐藏 chrome。当用户导航到不同的页面时,URL 会发生变化,以便用户可以自然地共享页面并从他们离开的地方继续。

不过,这种效果在 iOS 上的 Chrome 中似乎已经无法实现了。

尽管 chrome 在滚动时按预期缩小,但现在每次地址栏中的 URL 更改时,chrome 都会重置为其非缩小状态,即使它只是一个更改的锚(例如page.html#p1to page.html#p2)。

其他浏览器不受影响(包括 iOS 上的 Safari 和 Android 上的 Chrome,后者具有原生全屏模式)。

这是错误地还是故意地修补了?

如果是有意的,是否有一种解决方法允许全屏,而不需要进行戏剧性的重建,例如通过改变我们的用户体验来适应单一的配置?

0 投票
2 回答
7111 浏览

javascript - How can I use iOS Chrome's "Open in" feature on iOS with PDF behind secured website or with a large data URL?

I'm working on a website which serves PDF files (generated on the fly) for viewing and downloading by the user. The user needs to save these, sign them (using any 3rd party PDF app), then upload them. For this particular question we are focused on the handing off of the PDF from Chrome on iOS to a 3rd party PDF application.

On an unsecured, public website viewing a PDF from a public link such as this IRS form works fine. You can view it, then press "Open in..." in the bottom right and choose another application. The other application will receive the URL of the PDF and open it fine.

However, on a secured website, the hand-off does not happen correctly. After pressing "Open in..." in the bottom right on the PDF and choosing the 3rd party PDF app, the other app will receive the URL but not the cookies required to maintain session state. Therefore when it downloads the PDF it gets the login page of the website. Different applications handle this different but for instance, Google Drive will save the login page as a corrupt PDF file. Note that this works fine in Safari, the issue is with iOS Chrome.

What I've tried to do instead is to have the Chrome browser on iOS load the PDF as a blob, then create a data url and display the PDF using that:

This approach works fine and displays the PDF successfully. However, pressing "Open in..." in the bottom right to hand-off the PDF to another app does not work. Pressing it is unresponsive. I assume this is because of the large size of the data url, and that not being supported for hand-off to another app.

Any thoughts? How can I use iOS Chrome's "Open in" feature on iOS with PDF behind secured website or with a large data URL?

Here is an example page that will load a PDF as a data url. It works to display a PDF on Chrome iOS only. Other browsers aren't a fan of this method.

0 投票
4 回答
9611 浏览

pull-to-refresh - 在 iPhone 上禁用 Chrome 的下拉刷新

我正在我的网站上实现一个绘图应用程序,并试图在用户在画布上绘图时防止过度滚动。尽管尝试了几种报告的解决方案,但我无法禁用 Chrome 的下拉刷新。

根据https://developers.google.com/web/updates/2017/11/overscroll-behavior,以下一行 css 应该可以解决问题..但是 pull-to-refresh 并且令人讨厌的用户体验仍然存在。有任何想法吗?

0 投票
0 回答
4836 浏览

ios - 适用于 Chrome iOS 的“添加到主屏幕”

添加到主屏幕在适用于 iOS 的 Safari 和适用于 Android 的 Chrome 上运行良好。

在发布问题之前搜索时看到了这个答案。我想知道是否有人知道这是否有任何更新?

如果它不像添加另一个元标记那么简单,有人可以指出我强制执行此操作或完全删除 Chrome 上的 Url 和 Nav 栏的方向吗?

当然,我更希望能够将 Web 应用程序保存到主屏幕,但我愿意接受建议。

提前致谢!

0 投票
1 回答
3472 浏览

ios - 以 Blob 格式下载 PDF 无法在 Chrome iOS 上运行

在我的 Angular 7 应用程序中,我有以下代码用于在各种平台上下载 PDF。

下载在除 Chrome iOS 之外的所有平台上都能正常运行。我主要关注这个链接和其他一些类似的链接。

我还为 Chrome iOS 尝试了以下案例

也替换onloadendonload上面并尝试了两种方式。另外,我也尝试了代码Safari,但也失败了。

知道我在这里可能缺少什么吗?