cross-browser

Equivalent to produce field glow in other browsers?

删除回忆录丶 提交于 2019-12-07 02:15:29
问题 I was long using this to add a glow to focused fields, I accessed my page from Firefox for the first time and realized it doesn't work on it, and most likely not on explorer either. border: 1px solid #E68D29; outline-color: -webkit-focus-ring-color; outline-offset: -2px; outline-style: auto; outline-width: 5px; I had copy pasted it from another page so I'm not quite sure how it works. What is the equivalent for Firefox or Explorer? I mean how do I make a similar glow in other browsers? Thanks

Stop automatic scrolling on page content change

风格不统一 提交于 2019-12-07 01:40:51
问题 I have a page which adds and removes some content to itself on a scroll event. Now when using Chrome(IE11 doesn't seem to have this behaviour), whenever the content is added and removed to the page a scroll event is generated (I guess in order to keep the client view consistent on page changes). I don't want this. The scroll event generated on the content change will trigger more content changes which will in turn trigger more scroll events. Any advice on how I can stop this behaviour for all

Fixing the Browser Mode in IE Programmatically

柔情痞子 提交于 2019-12-07 01:35:21
问题 I have a website that works in full compatibility on All browsers including IE 7 to 9 I was shocked when i tried it on IE-10, Too many bugs, and because I have no time to fix this for IE-10 and i am also using third party controls "Telerik", I decided to try a simple solution by turning the Document and the browser mode back to ie9. In Developer Tools for IE-10, If i set Manually The Document Mode to IE9 Standards and the Browser Mode to IE9, All the bugs will fly away, I have found a way

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

孤街浪徒 提交于 2019-12-07 01:15:11
问题 $(".feature").change(function(){ getProductSelections(); }); ARRRGHH!! 回答1: 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

onbeforeunload dialog cancellation with window.location.href IE8 bug

痴心易碎 提交于 2019-12-07 00:37:56
问题 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

Cross Browser offsetWidth

蓝咒 提交于 2019-12-07 00:15:14
问题 I've been having an issue with using offsetWidth across different browsers. This difference in results is causing some strange layouts. I've created a very small example that displays what I'm seeing. jsbin HTML <table id="tbl"> <tr> <td>Cell 1</td> <td>Cell 2</td> </tr> </table> <button onclick="calc()">Calculate Offset Width</button> <div>Cell 1 offsetWidth: <span id="c1offWidth"></span></div> js function calc(){ document.getElementById('c1offWidth').innerHTML = document.getElementById('tbl

cross browser nowrap textarea

你说的曾经没有我的故事 提交于 2019-12-06 22:49:43
问题 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

Encoded URL with square brackets. Different behaviour in Chrome/Firefox/IE

时光总嘲笑我的痴心妄想 提交于 2019-12-06 20:53:44
问题 I have a link looking like this (it's a bit ugly because it is URL ) <a href="/items?fc%5B%5D=12345&fc%5B%5D=56789&utf8=%E2%9C%93">foo</a> To be a bit clear, it is URL encoded and translates to <a href="/items?fc[]=12345&fc[]=56789&utf8=✓">foo</a> When the form is submitted, the destination URL looks different in different browsers: In Firefox, it looks like desired: http://mydomain/items?fc[]=12345&fc[]=56789&utf8=✓ In Chrome, the square brackets are shown URL-encoded, (which gives very ugly

-moz and -webkit css no longer needed?

感情迁移 提交于 2019-12-06 19:58:08
问题 I have been using the -moz and -webkit css styles for a while now for things like box shadow, text shadow, etc. And lately I have noticed that each FireFox, Chrome, Safari, and IE ( 9 ) all yield the same results with the standard box-shadow and text-shadow and similar css styles. I was wondering if this is documented anywhere. Because I successfully removed all of the browser-specific ones from a site and it still looks the same in all four of those browsers. 回答1: I suppose it depends on the

Why does code after </html> tag get moved to before </body>? Is there a performance gain?

折月煮酒 提交于 2019-12-06 18:47:41
问题 Reading other Stack Overflow posts like this SO question lead me to this odd Google recommendation on CSS optimization. "Odd" being their recommendation for deferring CSS loading ended like this: <div class="blue">Hello, world!</div> </body> </html> <noscript><link rel="stylesheet" href="small.css"></noscript> Aside from seeming excessive, confusing, having invalid HTML, and stating "The application order of CSS rules is maintained... through javascript." even though there is no javascript