Make it configurable whether to leave insertmode on click
This commit is contained in:
parent
0028bd94cc
commit
593a2fe4ec
@ -370,6 +370,10 @@ DATA = OrderedDict([
|
||||
"Whether to switch to insert mode when clicking flash and other "
|
||||
"plugins."),
|
||||
|
||||
('auto-leave-insert-mode',
|
||||
SettingValue(types.Bool(), 'true'),
|
||||
"Whether to leave insert mode if a non-editable element is clicked."),
|
||||
|
||||
('auto-insert-mode',
|
||||
SettingValue(types.Bool(), 'true'),
|
||||
"Whether to automatically enter insert mode if an editable element "
|
||||
|
@ -264,10 +264,9 @@ class WebView(QWebView):
|
||||
log.mouse.debug("Clicked editable element!")
|
||||
modeman.enter('insert', 'click')
|
||||
else:
|
||||
# We don't leave the insert mode here as _is_editable is just an
|
||||
# approximation, and the user will get annoyed if insertmode is
|
||||
# left with every click.
|
||||
log.mouse.debug("Clicked non-editable element!")
|
||||
if config.get('input', 'auto-leave-insert-mode'):
|
||||
modeman.maybe_leave('insert', 'click')
|
||||
|
||||
def _mousepress_opentarget(self, e):
|
||||
"""Set the open target when something was clicked.
|
||||
|
Loading…
Reference in New Issue
Block a user