forked from cory/tildefriends
Fix some obvious things now that the RPC is slightly better.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3957 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@@ -67,7 +67,7 @@ Vue.component('tf-message', {
|
||||
show_message: function() {
|
||||
window.parent.postMessage({
|
||||
action: 'setHash',
|
||||
hash: tf.g_data.whoami + ':' + this.message.id,
|
||||
hash: this.message.id,
|
||||
}, '*');
|
||||
},
|
||||
expand_image: function(event) {
|
||||
@@ -89,7 +89,12 @@ Vue.component('tf-message', {
|
||||
img.style.objectFit = 'contain';
|
||||
img.style.width = '100%';
|
||||
div.appendChild(img);
|
||||
div.onclick = function() { document.body.removeChild(div); };
|
||||
function image_close(event) {
|
||||
document.body.removeChild(div);
|
||||
window.removeEventListener('keydown', image_close);
|
||||
}
|
||||
div.onclick = image_close;
|
||||
window.addEventListener('keydown', image_close);
|
||||
document.body.appendChild(div);
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user