diff options
author | Robert Manea <gotmor@gmail.com> | 2009-10-20 17:09:05 +0200 |
---|---|---|
committer | Robert Manea <gotmor@gmail.com> | 2009-10-20 17:09:05 +0200 |
commit | 80b551b6717accb9739a60e527ae90784cfc574a (patch) | |
tree | 538e607af588a9a34da941616a4246139d646d08 /examples | |
parent | bb5efd8d5e44518ecbeb91776dff988a9ff29154 (diff) |
added automatic switching to insert mode if a text field has initial focus
Diffstat (limited to 'examples')
-rw-r--r-- | examples/config/uzbl/config | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config index c3babe0..8cb4876 100644 --- a/examples/config/uzbl/config +++ b/examples/config/uzbl/config @@ -42,6 +42,11 @@ set new_window = sh 'uzbl-browser -u $8' # equivalent to the default beh @on_event LOAD_FINISH @set_status <span foreground="gold">done</span> @on_event LOAD_FINISH spawn @scripts_dir/history.sh +# Generate a FORM_ACTIVE event if a text element on the loaded site +# has initial focus unfortunatelly this only works for text elements, +# yet due to webkit limitations +@on_event LOAD_FINISH js if(document.activeElement.getAttribute('type') == 'text') {Uzbl.run("event FORM_ACTIVE");} + # Switch to insert mode if a (editable) html form is clicked @on_event FORM_ACTIVE @set_mode insert # Switch to command mode if anything else is clicked |