This is fixed now. I've attached patched files. 1.5.10 has been updated (1.5.10a) to indicate that these changes have been included in the release from roughly this message.
You want to overwrite js/xenforo/bb_code_edit.js and js/xenforo/full/bb_code_edit.js with the corresponding versions from the attachment. Note that you may need to hard refresh your browser for it to get the updated JS files.