Comment 8 for bug 1502675

Revision history for this message
Olivier Tilloy (osomon) wrote :

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.