Skip to content

Commit

Permalink
v0.8.1: allow scrolling on long comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienjoly committed Aug 12, 2017
1 parent 3047f4e commit 6bc920a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trello-outliner-power-up",
"version": "0.8.0",
"version": "0.8.1",
"description": "Comment Editor by AJ: a Trello Power-Up that allows you to edit card comments using an Outliner.",
"homepage": "https://adrienjoly.com/trello-outliner",
"main": "server/server.js",
Expand Down
7 changes: 6 additions & 1 deletion public/css/comment-editor.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
body {
background: initial;
padding: 20px;
overflow: hidden;
box-sizing: border-box;
min-height: 100%;
}

.window-overlay {
display: block;
overflow-y: scroll;
position: absolute;
}

.window {
display: block;
width: inherit;
margin: 0;
padding-right: 38px;
box-sizing: border-box;
overflow-y: scroll;
}

/* buttons */
Expand Down
6 changes: 5 additions & 1 deletion public/js/comment-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ function initEditor(token, commentId, SimpleMDE) {
}
}
$('.js-close-window').click(closeEditor);
$('.window-overlay').click(closeEditor);
$('.window-overlay').click(function(e){
if(e.target === this){ // ignore clicks on child elements
closeEditor();
}
});
$(document).keyup(function(e) {
if (e.keyCode == 27) { // escape key maps to keycode `27`
closeEditor()
Expand Down
3 changes: 1 addition & 2 deletions views/comment-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
<link rel="stylesheet" href="/simplemde/dist/simplemde.min.css">
<link rel="stylesheet" href="/css/comment-editor.css">
</head>
<body>
<div class="window-overlay"></div>
<body class="window-overlay">
<div class="window">
<div class="window-buttons">
<a class="window-button icon-lg icon-external-link js-new-tab" href="#"></a>
Expand Down

0 comments on commit 6bc920a

Please sign in to comment.