diff --git a/4chan_x.js b/4chan_x.js
index b381115ef..d29a6b5db 100644
--- a/4chan_x.js
+++ b/4chan_x.js
@@ -1129,10 +1129,10 @@
}
},
dialog: function(link) {
- var MAX_FILE_SIZE, THREAD_ID, clone, dialog, el, form, html, spoiler;
+ var MAX_FILE_SIZE, THREAD_ID, clone, dialog, el, html, spoiler;
MAX_FILE_SIZE = $('input[name="MAX_FILE_SIZE"]').value;
THREAD_ID = g.THREAD_ID || link.pathname.split('/').pop();
- html = "
";
+ html = " ";
dialog = ui.dialog('qr', {
top: '0px',
left: '0px'
@@ -1155,8 +1155,7 @@
className: 'inputtext',
required: true
});
- form = dialog.lastElementChild;
- $.bind(form, 'submit', qr.cb.submit);
+ $.bind($('form', dialog), 'submit', qr.cb.submit);
$.bind($('input[name=recaptcha_response_field]', clone), 'keydown', Recaptcha.listener);
$.append(d.body, dialog);
return dialog;
diff --git a/script.coffee b/script.coffee
index 117e47d4e..c6a368a00 100644
--- a/script.coffee
+++ b/script.coffee
@@ -888,6 +888,7 @@ qr =
+
"
dialog = ui.dialog 'qr', top: '0px', left: '0px', html
@@ -908,8 +909,7 @@ qr =
className: 'inputtext'
required: true
- form = dialog.lastElementChild
- $.bind form, 'submit', qr.cb.submit
+ $.bind $('form', dialog), 'submit', qr.cb.submit
$.bind $('input[name=recaptcha_response_field]', clone), 'keydown', Recaptcha.listener
$.append d.body, dialog