How to go full-screen in portrait mode?

I am building a web base game with Cocos Creator.
The canvas width and height set to Fit
I created a separate version to play on mobile browsers.

The game can be played in landscape and portrait mode. But it has 2 different interfaces for those mode.

What I have done is build the game in landscape mode. Then detect the orientation and switch the correct interface. This works well.

But when I tried this on Android phones, the orientation is jerky. It jumps from one orientation to the other. There is no smooth transition.

If I build the game with orientation set to auto. The transition is smooth. But the game does not fill the full screen as expected.

Is there a way around this problem. If I can rotate the canvas and readjust it, will fix the problem.
I hope my explanation is clear enough…