cross-browser

My website has font that is not supported/recognized in Firefox

半城伤御伤魂 提交于 2019-12-12 00:05:44
问题 My website is not showing the appropriate font, PT Sans.ttc. I checked on other browsers and it works fine. www.farmap-ux.com. Below is CSS code. @font-face { font-family: PT Sans; font-family: font-family: 'PT Sans', sans-serif; src: url("http://fonts.googleapis.com/css?family=PT+Sans") } So it works on everything like I said (Chrome, Safari, even Opera!) Any ideas? I've tried to find .woff files for the font but I don't think it's in my Font Book. 回答1: Maybe it's because your @font-face

Cannot close popup() window in iPhone Safari

六眼飞鱼酱① 提交于 2019-12-12 00:01:28
问题 I wrote a simple script which should close popup window opened by user click ( onclick ). However, it does not work in Apple iPhone device which I use to test (iOs 8.1), but seems to work everywhere else. I found an information about bug in safari HERE but I wonder is there any workaround which can help make it work for people who using version 8.1? function popitup(url, windowName) { var newwindow = window.open(url, windowName, 'height=10px,width=10px,top=5000,left=5000,location=0,menubar=0

Why FIrefox doesn't recognize <section>?

落爺英雄遲暮 提交于 2019-12-11 23:39:10
问题 I would just like to confirm if Firefox can't interpret <section> tag? I created a website and tested it on Chrome and Safari. Everything was fine until I tested it on firefox and it was horrible. It took me almost 2 days just to figure out that Firefox cant handle <section> tag. I would just like to confirm because I am not sure about it. 回答1: Adding article { display: block; } to your style sheet. FF is probably treating it as an inline element because it's not fully supported. I've used

IE and FF render my table “unexpectedly”

不羁岁月 提交于 2019-12-11 23:26:43
问题 I've been struggling with Table-Layout and now I tried to implement the lessons in my application - and that supposedly "simple rendering exercise" still ruins my day :(( The screenshot below illustrates the problem a bit: 2 rows have a fixed height of 20px, but as the 5th col is too heigh, IE splits the neccassary "filling" equally across all rows, whereas FF respects the assign row-height and only extends the last row w/o a height-spec. (In my real case, also FF renders incorrectly and

javascript and iframe not supported in browsers other than IE

China☆狼群 提交于 2019-12-11 20:16:33
问题 I run a simple html file with an iframe and javascript working fine in IE Browser, but it is not working in other browsers like safari,firefox. In safari the Iframe box is only displayed, but the content in that is not shown. Please clarify why safari doesn't support it? what are the alternatives for iframe? 回答1: You can use <embed> tag ,which behaves like iframe Here is example <!doctype html > <html > <head> <title>embed Tag </title> </head> <body> <p><b>Example of embed tag in HTML5.</b><

Cross-browser localStorage

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 20:16:11
问题 i imagined a todo list written in plain JS without using framework just to see the localStorage cross-browser compatibility. The script is function addText(){ var input = document.getElementById('input').value; date = new Date(); var time = date.getTime(); if (input !== "") { localStorage.setItem(time,"lalala"); document.getElementById('input').value = ''; }}; function loadText(){ if (window.localStorage) { for(var i in window.localStorage){ console.log(i+"--------theiiiiiii"); var z =

javascript works in IE but not in firefox

被刻印的时光 ゝ 提交于 2019-12-11 20:14:29
问题 I am wonder to find document contain all javascript statements works in IE but not in mozilla. Is there any common document that specify statements works in IE but not in mozilla ? 回答1: Its probably not a definitive list, but this document: http://www.ibm.com/developerworks/web/library/wa-ie2mozgd/ gives details of some differences and how to deal with them. 来源: https://stackoverflow.com/questions/9033402/javascript-works-in-ie-but-not-in-firefox

jQuery Ajax Get Doesn't Pass Received Data Into Success Function at Internet Explorer

☆樱花仙子☆ 提交于 2019-12-11 19:57:19
问题 My question is when I use jQuery ajax get, I am getting data at response body however it doesn't pass into success function. How can I make it work? I am making an ajax put but it doesn't work at ie9 (works on other browsers) so I changed it like that just for test: $.ajax({ async : false, type: 'PUT', contentType: 'application/json', url:updateUrl + "?_" + new Date().getTime(), data: JSON.stringify(model), cache: false, dataType: "json", dataFilter: function(data) { var resp = eval('(' +

different width of same text across browsers

断了今生、忘了曾经 提交于 2019-12-11 19:54:37
问题 The width of text is rendered differently across Chrome(/safari), FF and IE. There is a quite big difference between Chrome and FF, while only small gaps between FF and IE. You can see the difference by opening this in browsers: http://jsfiddle.net/xhx9z/ Does anybody know if there is any way to reduce the gap so that the width are close across browsers. Simple test: <span>this is a test of text width and see the difference across browsers<span> $(document).ready(function() { alert($('span')

Workaround for Safari IOS pointer events (not supported)

╄→尐↘猪︶ㄣ 提交于 2019-12-11 19:28:50
问题 https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/pointerdown_event Hello I have working code for a long click, but pointer event api is not supported in Safari only, currently under development. Is there some simple workaround I can apply just for safari? Unless I can just use some other event? I've tried with 'mousedown/mouseup' but no luck. The below code works with "touchstart/touchend" as well as "pointerdown/pointerup" but neither have comprehensive browser support. let