Skip to content

Commit

Permalink
πŸ‘† Text selection fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed May 16, 2020
1 parent 7a3192d commit 695aff9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In the example below, changing the parameter `A` and running the first cell will
<br >

### HTML interaction
Lastly, here's _**one more feature**_: Pluto notebooks have a `@bind` macro to create a **live bond between an HTML object and a Julia variable**. Combined with reactivity, this is a very powerful feature!
Lastly, here's _**one more feature**_: Pluto notebooks have a `@bind` macro to create a **live bond between an HTML object and a Julia variable**. Combined with reactivity, this is a very powerful tool!

<img alt="@bind macro screencap" src="https://user-images.githubusercontent.com/6933510/80617037-e2c09280-8a41-11ea-9fb3-18bb2921dd9e.gif" width="70%">

Expand Down Expand Up @@ -71,7 +71,7 @@ julia> ]
(v1.0) pkg> add Pluto
```

_Adding the first package to Julia can take up to 30 minutes - hang in there!_
_Using the package manager for the first time can take up to 15 minutes - hang in there!_

To run the notebook server:
```julia
Expand Down
2 changes: 1 addition & 1 deletion assets/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function createCodeMirrorInsideCell(cellNode, code) {

cm.on("blur", (cm, e) => {
if (document.hasFocus()) {
cm.setSelection({ line: 0, ch: 0 })
cm.setSelection({ line: 0, ch: 0 }, { line: 0, ch: 0 }, {scroll: false})
if (!cellNode.classList.contains("code-differs") && cellNode.remoteCode == "") {
requestDeleteRemoteCell(cellNode.id)
}
Expand Down
9 changes: 5 additions & 4 deletions assets/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,14 @@ setTimeout(() => {
}), 5000)
.then(function () {
message = "Submitted. Thank you for your feedback! πŸ’•"
console.log(message);
alert(message);
console.log(message)
alert(message)
feedbackform.querySelector("#opinion").value = ""
})
.catch(function (error) {
message = "Whoops, failed to send feedback 😒\nWe would really like to hear from you! Please got to https://github.com/fonsp/Pluto.jl/issues to report this failure:\n\n"
console.error(message);
console.error(error);
console.error(message)
console.error(error)
alert(message + error)
})

Expand Down
13 changes: 7 additions & 6 deletions assets/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ cell:hover>celloutput>div::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .15);
}

cell.error > celloutput > div > pre,
cell.inline-output>celloutput>div>pre {
margin: 0px;
display: flex;
Expand Down Expand Up @@ -456,22 +457,22 @@ cell.running>trafficlight {
background: repeating-linear-gradient( -45deg, hsla(20, 20%, 80%, 1), hsla(20, 20%, 80%, 1) 8px, hsla(20, 20%, 80%, .1) 8px, hsla(20, 20%, 80%, .1) 16px) !important;
background-size: 4px 22.62741699797px;
/* 16 * sqrt(2) */
animation: 2s linear 0s infinite running scrollbackground;
animation: 2000s linear 0s infinite running scrollbackground;
}

cell.running.error>trafficlight {
background: repeating-linear-gradient( -45deg, hsl(0, 100%, 71%), hsl(0, 100%, 71%) 8px, hsla(12, 71%, 47%, 0.33) 8px, hsla(12, 71%, 47%, 0.33) 16px) !important;
background-size: 4px 22.62741699797px;
/* 16 * sqrt(2) */
animation: 2s linear 0s infinite running scrollbackground;
animation: 2000s linear 0s infinite running scrollbackground;
}

@keyframes scrollbackground {
0% {
background-position-y: 0px;
}
100% {
background-position-y: 22.62741699797px;
background-position-y: 22627.41699797px;
/* 16 * sqrt(2) */
}
}
Expand Down Expand Up @@ -542,19 +543,19 @@ Based on "ParaΓ­so (Light)" by Jan T. Sott:
}

.cm-s-default div.CodeMirror-selected {
background: #b9b6b0;
background: #d9dfef;
}

.cm-s-default .CodeMirror-line::selection,
.cm-s-default .CodeMirror-line>span::selection,
.cm-s-default .CodeMirror-line>span>span::selection {
background: #b9b6b0;
background: #d9dfef;
}

.cm-s-default .CodeMirror-line::-moz-selection,
.cm-s-default .CodeMirror-line>span::-moz-selection,
.cm-s-default .CodeMirror-line>span>span::-moz-selection {
background: #b9b6b0;
background: #d9dfef;
}

.cm-s-default .CodeMirror-gutters {
Expand Down
6 changes: 3 additions & 3 deletions assets/treeview.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jltree {

jltree::before {
display: inline-block;
content: " ";
background-size: 1em 1em;
content: "";
background-size: 100%;
height: 1em;
width: 1em;
background-position-y: .2em;
margin-bottom: -.1em;
opacity: .5;
cursor: pointer;
background-image: url(https://cdn.jsdelivr.net/gh/ionic-team/[email protected]/src/svg/caret-down-outline.svg);
Expand Down

1 comment on commit 695aff9

@fonsp
Copy link
Owner Author

@fonsp fonsp commented on 695aff9 May 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.