diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index c1ed86ccc..ecba252c4 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -1121,8 +1121,10 @@ function folderSelected(id, name) {
function printKeywordChooserJs($formName) { /* {{{ */
?>
-$('#acceptkeywords').click(function(ev) {
- acceptKeywords();
+$(document).ready(function() {
+ $('#acceptkeywords').click(function(ev) {
+ acceptKeywords();
+ });
});
\n";
print "";
- print "";
+ print "";
print "".($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file"))."…\n";
print "\n";
?>
@@ -1233,8 +1235,10 @@ function folderSelected(name) {
function clearFilename() {
$('#dropfolderfile').val('');
}
-$('#clearfilename').click(function(ev) {
- $('#dropfolderfile').val('');
+$(document).ready(function() {
+ $('#clearfilename').click(function(ev) {
+ $('#dropfolderfile').val('');
+ });
});