org.zkoss.zul.tablet.meta.viewport.disabled"

From Documentation
m
Line 8: Line 8:
 
  [Since 6.5.0]
 
  [Since 6.5.0]
  
Specifies whether to disable the viewport content or not on tablet device. It is enabled by default.
+
Specifies whether to generate a meta viewport tag or not for tablet devices. It is enabled by default.
  
By default, ZK will generate the following viewport content on tablet device:
+
By default, ZK generates the following meta viewport tag for tablet devices:
 
<source lang="html">
 
<source lang="html">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >
+
<meta name="viewport"  
 +
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >
 
</source>
 
</source>
If you set this library property to true, the above viewport content will be discard.
+
If you set this library property to true, ZK will not generate the meta above.
  
  
Line 21: Line 22:
 
<?page viewport="width=device-width,initial-scale=1.0,maximum-scale=5.0"?>
 
<?page viewport="width=device-width,initial-scale=1.0,maximum-scale=5.0"?>
 
</source>
 
</source>
 +
 +
Note: Enable user-scalable might have some potential issues like scrolling, unnecessary events.
 +
  
 
= Version History =
 
= Version History =

Revision as of 13:49, 21 December 2017


org.zkoss.zul.tablet.meta.viewport.disabled


Property:

org.zkoss.zul.tablet.meta.viewport.disabled
Applicable:
Dndsmalltalk-check-icon.png globally in zk.xml via <library-property>
Dndsmalltalk-cross-icon.png not as <custom-attribute>
Default: false
[Since 6.5.0]

Specifies whether to generate a meta viewport tag or not for tablet devices. It is enabled by default.

By default, ZK generates the following meta viewport tag for tablet devices:

<meta name="viewport" 
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >

If you set this library property to true, ZK will not generate the meta above.


If you prefer to configure a particular viewport of specific page, you could specify it as follows.

<?page viewport="width=device-width,initial-scale=1.0,maximum-scale=5.0"?>

Note: Enable user-scalable might have some potential issues like scrolling, unnecessary events.


Version History

Last Update : 2017/12/21


Version Date Content
6.5.0 September 2012 Viewport should enabled on tablet device.


Last Update : 2017/12/21

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.