--- a/WebBrowser/WebBrowserView.py Sat Feb 18 19:59:14 2017 +0100 +++ b/WebBrowser/WebBrowserView.py Sun Feb 19 19:23:21 2017 +0100 @@ -517,7 +517,7 @@ for suggestion in contextMenuData.spellCheckerSuggestions(): act = menu.addAction( suggestion, - lambda: self.page().replaceMisspelledWord(suggestion)) + self.__replaceMisspelledWord) act.setFont(boldFont) if bool(menu.actions()): @@ -929,6 +929,14 @@ bool(url.scheme()) and \ "." in url.host() + def __replaceMisspelledWord(self): + """ + Private slot to replace a misspelled word under the context menu. + """ + act = self.sender() + suggestion = act.text() + self.page().replaceMisspelledWord(suggestion) + def __openLinkInNewTab(self): """ Private method called by the context menu to open a link in a new