google-chrome

after range.setStart new characters appear in previous node

浪子不回头ぞ 提交于 2021-02-08 08:21:26
问题 this happens in chrome (71.0.3578.80 on windows): on range.setStart the caret moves to the reference node, but after typing the new characters appear in the node before, when offset is 0. the expected behaviour would be, that the characters appear in the reference node of range.setStart. see here: http://jsfiddle.net/pgrds9qv/ function setCaret() { var el = document.getElementById("editable"); var range = document.createRange(); var sel = window.getSelection(); range.setStart(el.childNodes[2]

chrome and safari render css columns differently when number of items equals number of columns

二次信任 提交于 2021-02-08 07:32:05
问题 I've got a directory listing that uses CSS columns but behaves differently in Chrome and Safari. Each section of the directory has a wrapper that arranges the listings into two columns. I've got the CSS so Chrome renders it the way I want: In Safari, the first item in the second column sometimes has an apparent margin above it. I can fix this in Safari by adding display: inline-block; to the list elements. This breaks the layout in Chrome, as sections which have only two items list both items

How to force my Chrome browser to accept .requestFullscreen()?

房东的猫 提交于 2021-02-08 06:53:23
问题 I am writing an application for myself in which I need to go fullscreen automatically via JavaScript (today I simulate the press of F11, which usually works, but not always). I would like to use .requestFullscreen() (via screenfull.js) but I get Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture. This is understandable (for security / spam / usability reasons) and mentioned on numerous pages. Now, since this is my application running on my Chrome

Chrome JavaScript Date Constructor Appears to Get Dates Before 1884 Wrong

寵の児 提交于 2021-02-08 06:15:32
问题 If I pass the unix milliseconds timestamp value for 1/1/1753 (at midnight) (-6847786800000) to the JavaScript Date() constructor in Chrome, the Date Chrome gives me looks really weird. I get other weirdness when I use the Date() constructor that takes seven parameters. Examples are below. Chrome: new Date(-6847786800000): Mon Jan 01 1753 00:03:58 GMT-0456 (Eastern Standard Time) Firefox: new Date(-6847786800000): Mon Jan 01 1753 00:00:00 GMT-0500 (Eastern Standard Time) Note how Chrome made

Prevent google chrome cache html page

风流意气都作罢 提交于 2021-02-08 05:18:24
问题 I have a page with another html page in iframe. In this iframe, i put this header tag <META http-equiv="Pragma" content="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> <meta http-equiv="cache-control" content="no-cache" /> But chrome still cache it, when iframe content changed, hit f5 button but chrome still load cached version, not new version. Please tell me how to pevent google chrome cache this iframe. 回答1: Set the correct expiry headers in the HTTP response from your server. They

Prevent google chrome cache html page

痴心易碎 提交于 2021-02-08 05:14:08
问题 I have a page with another html page in iframe. In this iframe, i put this header tag <META http-equiv="Pragma" content="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> <meta http-equiv="cache-control" content="no-cache" /> But chrome still cache it, when iframe content changed, hit f5 button but chrome still load cached version, not new version. Please tell me how to pevent google chrome cache this iframe. 回答1: Set the correct expiry headers in the HTTP response from your server. They

Is it possible to get a click event from the chrome external protocol request?

爷,独闯天下 提交于 2021-02-08 05:12:58
问题 Is there any chance to track the click event on this div/pop up?Like if a user clicked on "Launch Application" button or "Do Nothing" button? Also,is it possible to know whether the div has actually appeared in the first place? ( I know we can track through on blur event but it isn't accurate) 来源: https://stackoverflow.com/questions/29343704/is-it-possible-to-get-a-click-event-from-the-chrome-external-protocol-request

Chrome vs Firefox - Why do CORS headers behave differently, and how should I use them?

我是研究僧i 提交于 2021-02-08 03:33:08
问题 I am doing Ajax calls with CORS headers. The short version is that in Firefox, it all works nicely, in Chrome I get an error: "Refused to set unsafe header Access-Control-Request-Method" , and the same thing for Access-Control-Request-Headers. So, I am just confused. Like, very confused. What is it that I have to do in order to make CORS work properly in both Chrome and Firefox? The weird part I will say, though, is that it seems that despite the error, Chrome does execute the Ajax call. I am

What is this data at the end of WebRTC candidate info?

不问归期 提交于 2021-02-08 03:31:51
问题 I set up a basic video chat app using the WebRTC APIs in Chrome along with a WebSocket script I wrote myself following the W3C specs and other questions here on SO. Sometimes though, when one PC sends ICE candidate info to the other PC via the WebSocket connection, a bunch of garbled text is attached to the end of the JSON-stringified candidate info. This problem only happens sometimes though, and it never happens with the SDP info sent via the createOffer and createAnswer methods. Please see

How to use the constant resolution during webrtc video transmission?

柔情痞子 提交于 2021-02-08 01:22:57
问题 I am using janus to build my webrtc SFU server. I need the chrome browser to send the video resolution from a start to a fixed value and remain unchanged during the transfer. Where should I set it? I tried setting the degradationPreference in the js code, but it didn't work, the resolution will still change, it seems that chrome does not support this parameter. var senderList = config.pc.getSenders(); var sender = config.pc.getSenders().find(function(s) {return s.track.kind == "video"}); if