cross-browser

use initial width for element not working in IE

假装没事ソ 提交于 2019-12-17 17:52:57
问题 I have a graph plugin that inserts canvas and a legend <table> to its container. In this plugin the table has no width defined and in my CSS there is a width for tables inside that container were my plugin gets inserted. So, the new div is inheriting table{ width: 100%} from the CSS and rendering wrong. I tried to use width: initial; , looks good on Chrome but IE doesn't like it check browser compatibility I admit changing/forcing a inline CSS in the script/plugin since it has to work in any

D3.JS Browser Support

邮差的信 提交于 2019-12-17 15:39:34
问题 Could a developer with experience of D3.JS indicate what specific browsers and browser version levels in practice most readily support the D3.JS library ? Is there a list of D3.JS 'components' which are known not to be compatible with specific browsers and browser version levels? The D3.JS website suggests : Browser Support D3 supports so-called “modern” browsers, which generally means everything except IE8 and below. D3 is tested against Firefox, Chrome (Chromium), Safari (WebKit), Opera and

D3.JS Browser Support

拥有回忆 提交于 2019-12-17 15:39:27
问题 Could a developer with experience of D3.JS indicate what specific browsers and browser version levels in practice most readily support the D3.JS library ? Is there a list of D3.JS 'components' which are known not to be compatible with specific browsers and browser version levels? The D3.JS website suggests : Browser Support D3 supports so-called “modern” browsers, which generally means everything except IE8 and below. D3 is tested against Firefox, Chrome (Chromium), Safari (WebKit), Opera and

How to register document.onkeypress event

不打扰是莪最后的温柔 提交于 2019-12-17 15:38:26
问题 I want to register keypress events for a document using javascript. I have used: document.attachEvent("onkeydown", my_onkeydown_handler); It works fine with IE, but not with Firefox and Chrome. I also tried: document.addEventListener("onkeydown", my_onkeydown_handler, true); // (with false value also) But it still doesn't work with Firefox and Chrome. Is there a solution, am I missing something? 回答1: You are looking for: EDIT: Javascript: document.addEventListener("keydown", keyDownTextField,

Detecting individual Unicode character support with JavaScript

夙愿已清 提交于 2019-12-17 15:36:32
问题 Is it possible to detect if the client supports a particular Unicode character or if it will be rendered as a missing glyph box? Important: Support in as many browsers as possible Not important: Efficiency, speed, or elegance The only method I can think of trying is using a canvas, so I figured I'd ask before I start going down that road. Thanks! Edit: This is not intended for use on a public web site; I am just trying to compile a list of characters supported by each browser. 回答1: This is

How to make input autofocus in internet explorer?

别说谁变了你拦得住时间么 提交于 2019-12-17 13:07:10
问题 Please check out my jsfiddle http://jsfiddle.net/WK2N3/1/ How can I make this on autofocus like it is for chrome, safari, opera and firefox for IE? 回答1: Here's a one-liner (well, one line of actual logic) that uses jQuery to make autofocus work in IE. It bails out if the focus is already set--in other words, in any HTML5-capable browser. $(function() { $('[autofocus]:not(:focus)').eq(0).focus(); }); I explained how it works in my blog. And here is an updated jsFiddle that works in IE. 回答2:

Zoom changes the design layout

风格不统一 提交于 2019-12-17 10:49:12
问题 I am working on a new website, which should be "perfect" - compatible with ie6+, ff, chrome, opera & safari. I made it compatible with all those browsers but there's one problem I cant handle - when changing the zoom, all the layout become disordered. Sample fiddle with the problem: http://jsfiddle.net/pdQrQ/1/ In Chrome (14.0.835), FF (7.0.1) & IE9, when zooming out - the top right box size is changing (atleast it looks like it) and then it is not right aligned with the box below. Edit: I

How to specify your webpage's language so Google Chrome doesn't offer to translate it

青春壹個敷衍的年華 提交于 2019-12-17 10:31:31
问题 I have a page that Google Chrome insists on thinking is in French. Here's a snapshot of it: http://yootles.com/outbox/overcleverchrome.html Note that I'm including a meta http-equiv tag to tell it that it's in fact in English: <meta http-equiv="Content-language" content="en"> But it doesn't help. Is there anything else I can do to prevent this? 回答1: Google Chrome currently requires several tags to make an (HTML5) document opt out of translation. Before doing this, you should be sure that you

Crossbrowser equivalent of explicitOriginalTarget event parameter

旧城冷巷雨未停 提交于 2019-12-17 09:59:26
问题 Does anyone know of crossbrowser equivalent of explicitOriginalTarget event parameter? This parameter is Mozilla specific and it gives me the element that caused the blur. Let's say i have a text input and a link on my page. Text input has the focus. If I click on the link, text input's blur event gives me the link element in Firefox via explicitOriginalTarget parameter. I am extending Autocompleter.Base's onBlur method to not hide the search results when search field loses focus to given

HTML5 audio not working on Firefox

白昼怎懂夜的黑 提交于 2019-12-17 09:55:15
问题 Works fine on Chrome. Moreover, I'm using an ogg file so that's not the problem. I'm running on the latest version 9.0.1. HTML5 audio is supposed to be supported by both Chrome and Firefox. <audio id="audio"> <source src="audio/Your_Hand_In_Mine.ogg" type="audio/ogg" /> <source src="audio/Your_Hand_In_Mine.mp3" type="audio/mpeg" /> Your browser does not support the audio element. </audio> 回答1: Most servers (including those used by GoDaddy) by default don’t serve the appropriate MIME Types for