A simple (simplistic) workaround consists in delaying the switch between one webview and the other. Something like that (for two webviews):
Item { WebView { anchors.fill: parent visible: (current == 0) || (next == 0) z: (current == 0) ? 1 : 0 }
WebView { anchors.fill: parent visible: (current == 1) || (next == 1) z: (current == 1) ? 1 : 0 }
property int current: 0 property int next: -1
Timer { id: switchTimer interval: 100 onTriggered: { current = next next = -1 } }
onSwitchWebviewRequested: { next = (current + 1) % 2 switchTimer.restart() } }
This is only a workaround though, fixing the root issue in oxide would be preferable of course. Until then, I’ll see if I can implement that workaround in the browser.
A simple (simplistic) workaround consists in delaying the switch between one webview and the other. Something like that (for two webviews):
Item {
anchors. fill: parent
WebView {
visible: (current == 0) || (next == 0)
z: (current == 0) ? 1 : 0
}
WebView {
anchors. fill: parent
visible: (current == 1) || (next == 1)
z: (current == 1) ? 1 : 0
}
property int current: 0
property int next: -1
Timer {
onTriggered: {
id: switchTimer
interval: 100
current = next
next = -1
}
}
onSwitchWeb viewRequested: {
switchTimer. restart( )
next = (current + 1) % 2
}
}
This is only a workaround though, fixing the root issue in oxide would be preferable of course. Until then, I’ll see if I can implement that workaround in the browser.