Don't override javaScriptPrompt because of PyQt bugs
This commit is contained in:
parent
392784213b
commit
f58e702589
@ -184,14 +184,18 @@ class BrowserPage(QWebPage):
|
|||||||
"""Override javaScriptConsoleMessage to use debug log."""
|
"""Override javaScriptConsoleMessage to use debug log."""
|
||||||
log.js.debug("[{}:{}] {}".format(source, line, msg))
|
log.js.debug("[{}:{}] {}".format(source, line, msg))
|
||||||
|
|
||||||
def javaScriptPrompt(self, _frame, msg, default):
|
# We don't overwrite javaScriptPrompt as it's completely broken at least in
|
||||||
"""Override javaScriptConfirm to use the statusbar."""
|
# PyQt 5.2.1 and 5.3.0:
|
||||||
answer = message.modular_question(
|
# http://www.riverbankcomputing.com/pipermail/pyqt/2014-June/034385.html
|
||||||
"js: {}".format(msg), PromptMode.text, default)
|
|
||||||
if answer is None:
|
#def javaScriptPrompt(self, _frame, msg, default):
|
||||||
return (False, "")
|
# """Override javaScriptConfirm to use the statusbar."""
|
||||||
else:
|
# answer = message.modular_question(
|
||||||
return (True, answer)
|
# "js: {}".format(msg), PromptMode.text, default)
|
||||||
|
# if answer is None:
|
||||||
|
# return (False, "")
|
||||||
|
# else:
|
||||||
|
# return (True, answer)
|
||||||
|
|
||||||
def chooseFile(self, _frame, suggested_file):
|
def chooseFile(self, _frame, suggested_file):
|
||||||
"""Override QWebPage's chooseFile to be able to chose a file to upload.
|
"""Override QWebPage's chooseFile to be able to chose a file to upload.
|
||||||
|
Loading…
Reference in New Issue
Block a user