Hey @duynq2197, let’s go over the problems you are having:
1.I’ve tried running a sample with your provided use case on a touch device, and the touch seemed to work just fine with webkitRequestFullscreen()
enabled. Please make sure you’ve included your code inside the following construct for the touch capabilities to work properly:
webix.ready(function(){
if ( webix.env.touch ){ // if touch device is detected
webix.Touch.limit(true);
};
webix.ui({ ... })
});
You can try the aforementioned sample here: https://vtesting2.netlify.com/ (and here is the source code), please tell me if you are having the same issues with this example as well.
2.If we are going by the API you are already trying to use, then document.exitFullscreen
should do the trick (as mentioned here it will minimize the current element being presented in fullscreen mode).
As a side note, I would like to recommend you use webix.fullscreen
API if you want to present any widget in a fullscreen mode. It’s got 2 methods: set
, which will enter the fullscreen mode, and exit
, which will do the opposite.