I found the culprit: UnityWebAppsUtils.js (from the unity-webapps-qml package) does this:
var script = 'import com.canonical.Oxide 1.0 as Oxide; ' + ' Oxide.ScriptMessageHandler { msgId: "UnityWebappApi-Message"; contexts: ["' + this._WEBAPPS_USER_SCRIPT_CONTEXT + '"]; ' + '}'; var messageHandler = Qt.createQmlObject(script, this.webview); messageHandler.callback = handler; this.webview.messageHandlers = [ messageHandler ]; So it effectively overrides the webview’s existing message handlers. ** Also affects: unity-webapps-qml Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Apps bug tracking, which is subscribed to webbrowser-app in Ubuntu. https://bugs.launchpad.net/bugs/1323735 Title: contextual menus not working in the webapp container Status in Unity WebApps QML component: New Status in The Webapps-core project: New Status in Web Browser App: Confirmed Status in “webbrowser-app” package in Ubuntu: Confirmed Bug description: - open twitter webapp and sign on - go to home view that shows tweets from people you are following - try and press and hold on any links in the tweets Expected results: - a popup menu is displayed with options to open link in new tab, copy link, etc Actual results: - no popup menu Note, this works correctly if loading twitter in browser but just not from webapp To manage notifications about this bug go to: https://bugs.launchpad.net/unity-webapps-qml/+bug/1323735/+subscriptions -- Mailing list: https://launchpad.net/~ubuntu-apps-bugs Post to : ubuntu-apps-bugs@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-apps-bugs More help : https://help.launchpad.net/ListHelp