Comments (8)
1st - document.body works everywhere since 1992... I can't see a scenario it does not exist.
2nd - $ assumes jquery or compatible framework, and detect-zoom is framework agnostic.
—
Sent from Mailbox for iPhone
On Fri, Mar 1, 2013 at 9:10 PM, jnmichaud [email protected]
wrote:
This error causes the entire detectZoom file to fail.
I replaced document.body.style.webkitTextSizeAdjust === 'string' with $.browser.webkit === true (as I am using jquery).Thought you should know.
Reply to this email directly or view it on GitHub:
#32
from detect-zoom.
And third - $.browser is deprecated and removed in latest jquery versions
from detect-zoom.
I appreciate the reply. Considering what you're doing, I think the info
about Jquery is pretty irrelevant to the situation. (The only reason I put
it in there is to demonstrate that I had to change your code and use a
bypass.)
As to document.body working or not... All I can tell you is that as of my
post, it was throwing errors in FireFox 19.0 and it stops the entire file
from loading or working so I had to do something to make it work. I'm using
the release update channel of firefox. I expect it's probably their error
and not yours, but it's doing what it's doing. What you decide to do about
that is up to you.
On Sun, Mar 3, 2013 at 6:02 AM, Bogdan Yurov [email protected]:
And third - $.browser is deprecated and removed in latest jquery versions
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-14346614
.
from detect-zoom.
What you are saying is pretty strange. I checked on FF 19.0 (Release
channel) and document, document.body, document.body.style are all there.
does the example on http://tombigel.github.com/detect-zoom/ work for you?
On Sun, Mar 3, 2013 at 3:23 PM, jnmichaud [email protected] wrote:
I appreciate the reply. Considering what you're doing, I think the info
about Jquery is pretty irrelevant to the situation. (The only reason I put
it in there is to demonstrate that I had to change your code and use a
bypass.)As to document.body working or not... All I can tell you is that as of my
post, it was throwing errors in FireFox 19.0 and it stops the entire file
from loading or working so I had to do something to make it work. I'm
using
the release update channel of firefox. I expect it's probably their error
and not yours, but it's doing what it's doing. What you decide to do about
that is up to you.On Sun, Mar 3, 2013 at 6:02 AM, Bogdan Yurov [email protected]:
And third - $.browser is deprecated and removed in latest jquery
versions—
Reply to this email directly or view it on GitHub<
https://github.com/tombigel/detect-zoom/issues/32#issuecomment-14346614>
.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-14346882
.
from detect-zoom.
Yes, actually it does.
Apparently the issue is with my site and not the file.
I have no idea why that would be the case. I'll have to look into it.
(document.body is showing as null for me, on my project.)
I apologize for the mistake.
On Sun, Mar 3, 2013 at 6:38 AM, Tom [email protected] wrote:
What you are saying is pretty strange. I checked on FF 19.0 (Release
channel) and document, document.body, document.body.style are all there.does the example on http://tombigel.github.com/detect-zoom/ work for you?
On Sun, Mar 3, 2013 at 3:23 PM, jnmichaud [email protected]
wrote:I appreciate the reply. Considering what you're doing, I think the info
about Jquery is pretty irrelevant to the situation. (The only reason I
put
it in there is to demonstrate that I had to change your code and use a
bypass.)As to document.body working or not... All I can tell you is that as of
my
post, it was throwing errors in FireFox 19.0 and it stops the entire
file
from loading or working so I had to do something to make it work. I'm
using
the release update channel of firefox. I expect it's probably their
error
and not yours, but it's doing what it's doing. What you decide to do
about
that is up to you.On Sun, Mar 3, 2013 at 6:02 AM, Bogdan Yurov [email protected]:
And third - $.browser is deprecated and removed in latest jquery
versions—
Reply to this email directly or view it on GitHub<
https://github.com/tombigel/detect-zoom/issues/32#issuecomment-14346614>.
—
Reply to this email directly or view it on GitHub<
https://github.com/tombigel/detect-zoom/issues/32#issuecomment-14346882>
.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-14347039
.
from detect-zoom.
The same issue is happening to me in current Chrome release (version 27.0.1453.94). The example you linked works. The difference between the two is the deployment method. Your example includes the script at the end of <body> element. Our application includes JS sources inside the <head> element.
To support this (valid) deployment method, your module shouldn't start its initialization on its own (before the document is ready). Instead, it could either expose an initialization method (which we'd call when the document is ready), or call it internally on first call of the exposed methods.
from detect-zoom.
Thank you. I'd assumed it was something like that (and I basically did just
that and bypassed most of the problem).
Much appreciated
On Fri, May 24, 2013 at 1:35 PM, hon2a [email protected] wrote:
The same issue is happening to me in current Chrome release (version
27.0.1453.94). The example you linked works. The difference between the two
is the deployment method. Your example includes the script at the end of
element. Our application includes JS sources inside the element.To support this (valid) deployment method, your module shouldn't start its
initialization on its own (before the document is ready). Instead, it could
either expose an initialization method (which we'd call when the document
is ready), or call it internally on first call of the exposed methods.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-18425357
.
from detect-zoom.
I'm not sure what you mean by that, but the latest commit still has the reported bug. To fix it, the detectFunction generator should be run on first use instead of on script inclusion. Like:
var detectFunction,
selectDetectFunction = function () { /* detect function generator */ },
initialize = function () {
if (!detectFunction) {
detectFunction = selectDetectFunction();
}
};
return {
zoom: function () {
initialize();
return detectFunction().zoom;
},
device: function () {
initialize();
return detectFunction().devicePxPerCssPx;
}
};
from detect-zoom.
Related Issues (20)
- Pls confirm my fix for failing detection of IE8 HOT 1
- detectZoom not defined HOT 6
- Invalid zoom in Chrome when touch/pen/tablet input devices is plugged into a desktop/laptop computer HOT 8
- Not working on latest Webkit Nightlies HOT 12
- Doesn't seem to detect "text only" zoom in Firefox HOT 2
- Doesn't work in Chrome 27 (which is now the current release channel version) HOT 3
- Uncaught TypeError when js included in head (Chrome 27)
- READ THIS: Detect-zoom is currently unusable for desktop HOT 10
- Typo in wiki
- detect-zoom changes zoom when you resize the browser window in Chrome HOT 1
- Incorrect value for zoom inside iframe in Chrome HOT 1
- More Accurate Device Pixel Ratio Function HOT 1
- Idea check the client width of a known Element HOT 1
- Collaboration request HOT 1
- should use screen.width/window.innerWidth for chrome HOT 2
- Firefox new version change default zoom HOT 2
- Wrong .device() on iOS 10
- Polling needed or event model exists?
- typescript version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from detect-zoom.