Detecting Kiosk mode (full scree)

B

bobby.owens

Hi,

Does anyone know how I can detect if internet explorer is in full
screen/kiosk mode via javascript?

I have an issue where my dynamically positioned controls are moved by
2px, but only when full screen

Thanks in advance
 
H

Henry

Does anyone know how I can detect if internet explorer
is in full screen/kiosk mode via javascript?

Probably not.
I have an issue where my dynamically positioned controls
are moved by 2px, but only when full screen

That sounds a lot like you javascript has a hard-coded 2px adjustment
that is attempting to compensate for the (default) 2px thickness of
the 'root element' borders. And in Kiosk mode there are no borders on
the root element so the adjustment is putting everything off.

Such a hard-coded adjustment never was a good idea as the 'root
element' borders could be subject to CSS and/or OS user configuration
so should have been dynamically acquired.

The 'root element' in IE is either document.body or
document.documentElement (depending on the rendering mode) and the
vertical or horizontal offsets that are 2px by default are the -
clientTop - and - clientLeft - properties of those elements.
Presumably in Kiosk mode the both of those properties of the 'root
element' will be zero, which could be the basis for a test (not a good
test as the values can be set to zero with CSS when not in Kiosk
mode), or just the source of the values that should be used in place
of a hard-code 2px.
 
R

rf

Hi,

Does anyone know how I can detect if internet explorer is in full
screen/kiosk mode via javascript?

Won't happen. The disposition of the browser window is up to the user and
none of your concern.
I have an issue where my dynamically positioned controls are moved by
2px, but only when full screen

Crikey. Two whole bloody pixels. Quick, open you umbrella, the sky is about
to fall.


Your design is broken if this matters.
 
T

The Natural Philosopher

rf said:
Won't happen. The disposition of the browser window is up to the user and
none of your concern.

He didn't ask how to set it, but how to detect it...
Crikey. Two whole bloody pixels. Quick, open you umbrella, the sky is about
to fall.


Your design is broken if this matters.

tend to agree. I just shove everything in a fixed size window and use
absolute positioning, if I am bothered, irrespective. If their browser
is to small, they will have to scroll.
 
B

bobby.owens

Won't happen. The disposition of the browser window is up to the user and
none of your concern.




Crikey. Two whole bloody pixels. Quick, open you umbrella, the sky is about
to fall.

Your design is broken if this matters.

I'm afraid the 2px is important, and my designe is not broken. The
users drag controls into a dashboard type environment and put the
controls in a particular position. If they are in full screen mode and
then save the positions, once they return to normal screen mode, the
ones they've just positioned are then 2px out. This means they no
longer are lined up with other items on the page
 
B

bobby.owens

Probably not.


That sounds a lot like you javascript has a hard-coded 2px adjustment
that is attempting to compensate for the (default) 2px thickness of
the 'root element' borders. And in Kiosk mode there are no borders on
the root element so the adjustment is putting everything off.

Such a hard-coded adjustment never was a good idea as the 'root
element' borders could be subject to CSS and/or OS user configuration
so should have been dynamically acquired.

The 'root element' in IE is either document.body or
document.documentElement (depending on the rendering mode) and the
vertical or horizontal offsets that are 2px by default are the -
clientTop - and  - clientLeft - properties of those elements.
Presumably in Kiosk mode the both of those properties of the 'root
element' will be zero, which could be the basis for a test (not a good
test as the values can be set to zero with CSS when not in Kiosk
mode), or just the source of the values that should be used in place
of a hard-code 2px.

Thank you very much Henry. The document.documentElement.clientTop &
clientLeft are exactly whats causing my problem. Much appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,269
Latest member
vinaykumar_nevatia23

Latest Threads

Top