cross-browser

Tooltips (title=“…”) won't show in Firefox

▼魔方 西西 提交于 2019-12-05 04:39:41
I have an element with a title attribute (i.e., a tooltip), wrapped in some container: <div id="foo"> <input type="text" title="A tooltip" /> </div> and I attach a "mousemove" event listener on the container and stop event propagation: document.getElementById('foo').addEventListener( 'mousemove', function(e) { e.stopPropagation() }, false ) This combination of stopping propagation of "mousemoves" on the container now prevents the tooltip from showing up for the inner textbox, in Firefox 2 and upwards. I've tried FF 2[.0.0.20], 3[.0.11], and the latest 3.5 (Windows Server 2003, XP). As a quick

At which point do you decide to stop supporting older browsers?

折月煮酒 提交于 2019-12-05 04:28:33
I would like to start a community discussion. As per my question, when do you decide to stop supporting older browsers? I've nearly completed the development of a large personal application. It uses a lot of HTML5, CSS3 and JavaScript. If I were to support older browsers, I would estimate that it would increase my front end work load by at least 50%. And to be frank, I don't want to support the older browsers. From a business point of view, one could argue that if I don't, I could lose revenue. I disagree. I feel that the customers who use older browsers wouldn't be the customers I would want

Why do my jQuery checkbox.change events only fire on leavefocus in IE but they happen onclick in FF?

放肆的年华 提交于 2019-12-05 04:15:59
$(".feature").change(function(){ getProductSelections(); }); ARRRGHH!! Web Bug Track: The onchange event can be attached (inline or as an event handler) to any form element. It fires whenever the value of the form field changes. Unfortunately, the behavior is a bit strange in IE, in that for a checkbox, or a radio button field, the event doesn't fire when it is supposed to (right when you click the option you want to choose), but instead it only fires, when you click elsewhere on the page/form, or if you explicitly call blur(); on the field. And the work around suggested is: <input type="radio

options to solve browser compatibility issues?

梦想的初衷 提交于 2019-12-05 04:06:45
问题 I am designing a web application with css3. Every one knows that lot of css3 properties like gradients, border-radius, box-shadow, animate, border-image, background-rgb, last-child, nth-child etc.. will not work in earlier IE versions such as IE8,7,6. some of the java script libraries like css3 pie can be used to make Internet Explorer 6-9 capable of rendering several of the most useful CSS3 decoration features such as gradients, border-radius, border-shadow, border-image(not Last-child, nth

Safe maximum amount of nodes in the DOM? [closed]

偶尔善良 提交于 2019-12-05 03:51:26
For a web application, given the available memory in a target mobile device 1 running a target mobile browser 2 , how can one estimate the maximum number of DOM nodes, including text nodes, that can be generated via HTML or DHTML? How can one calculate the estimate before Failure Crash Significant degradation in response Also, is there a hard limit on any browser not to cross per tab open? Regarding Prior Closure This is not like the other questions in the comments below. It is also asking a very specific question seeking a method for estimation. There is nothing duplicated, broad, or opinion

onbeforeunload dialog cancellation with window.location.href IE8 bug

时间秒杀一切 提交于 2019-12-05 03:42:15
Sorry about the obscure title, hopefully I can explain: I have a standard, "Are you sure you wish to leave" dialog that pops up when a user tries to leave a page: window.onbeforeunload = function() { return 'You have unsaved changes'; } When this is coupled with window.location.href and the user clicking cancel an 'Unspecified error' is thrown in internet explorer 8 or earlier. The same doesn't seem to happen with other modern browsers. <script type="text/javascript"> $('input').click(function() { window.location.href = 'http://www.google.com'; // error is thrown here }); </script> <input type

Chrome (windows) does not hide scrollbar

强颜欢笑 提交于 2019-12-05 03:39:23
I have this scrollable div, which (on my Mac in Chrome) hides the scrollbar when I don't scroll. On windows 8 however, it doesn't work in Chrome and Firefox. Ie doesn't support this too, but I've enabled it using the following CSS: -ms-overflow-style: -ms-autohiding-scrollbar; Is there any way to enable this behaviour for Chrome and Firefox Here is a jsfiddle maybe you can use something like that? body { margin:0; padding:0; overflow-y: hidden; } body:hover { overflow-y: scroll; } http://jsfiddle.net/4RSbp/165/ Scrollbar is hiding on your Mac because this is a system preference (System

Javascript get and set availability in browsers

冷暖自知 提交于 2019-12-05 03:33:46
Which browsers do not support the get and set methods for object prototypes? I believe this is a feature of ES5, an I know it works in Chrome, but I am wondering if it is safe to use for ajax apps. Here's an example: var foo = function () {}; foo.prototype = { get name () { return this._name; }, set name (n) { this._name = n || "bar"; } }; Here's a compatibility table for you. http://kangax.github.com/es5-compat-table/ See the Getter in property initializer and Setter in property initializer rows. According to the table: Firefox 4 Safari 5 Chrome 7-11 Other browsers (including IE9) are not

Feature-detect: mutation-event availability in JavaScript?

断了今生、忘了曾经 提交于 2019-12-05 03:33:16
How can my JavaScript detect if an event is available? I'm aware of some great event-compatibility tables , but I need to use feature detection, not browser-sniffing plus a lookup table. Specifically, my JS makes great use of the DOM mutation events ( DOMNodeInserted and DOMSubtreeModified ) -- which work great in all browsers except (of course) Internet Explorer. So, how would I detect if a browser supports DOMNodeInserted ? If you just want to check if the browser supports mutation events in general, you can use this simple test: var hasMutationEvents = ("MutationEvent" in window); Here are

cross browser nowrap textarea

纵然是瞬间 提交于 2019-12-05 02:57:39
I'm looking for a cross browser solution that makes textarea : wrap text only on enter scrollbars both hidden, until text overflows I have tried almost everything can be found in SO... Failed #1: textarea{ white-space:nowrap; overflow: auto; } does not work in FF Failed #2: textarea{ white-space:nowrap; overflow: auto; // or scroll } +WRAP=OFF attribute here I cant hit enter in IE ( jsFiddle ) Failed #3: textarea{ white-space:pre; overflow: auto; } +WRAP=OFF attribute auto line break in IE if I reaches the end mattytommo All I did was remove your white-space: nowrap; and it works :). textarea{