Skip to content

Commit

Permalink
focus
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Schwarzentruber committed Feb 12, 2024
1 parent 98c3303 commit 1de67e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</div>
<div>
<div id="audio"></div>
<text-map-editor id="editor"></text-map-editor>
<text-map-editor id="editor" tabindex="1"></text-map-editor>
<div id="outputWrapper">
<div id="output"></div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions js/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function clean() {
const measureLength = [];

for (let l = lbegin; l <= lend; l++) {
splits[l] = lines[l].split("|").map((s, i) => (i == 0) ? s.trimRight() : s.trim());
splits[l] = lines[l].split("|"); //.map((s, i) => (i == 0) ? s.trimRight() : s.trim());
console.log(splits)
for (let m = 0; m < splits[l].length; m++) {
if (m > measureLength.length - 1)
Expand Down Expand Up @@ -240,7 +240,8 @@ function addButton(text, hint, event) {

function buttonInsert(s, hint) {
console.log("add button " + s)
addButton(s, hint, () => {
addButton(s, hint, (evt) => {
evt.srcElement.blur();
editor.write(s)
editor.focus();
});
Expand All @@ -256,6 +257,7 @@ function editorInsert(str) {
}

function action8upOrDown(f) {

editor.focus();
/* if (editor.getSelectedText() == "") {
inputOctave.value = f("a" + inputOctave.value).substr(1);
Expand Down

0 comments on commit 1de67e1

Please sign in to comment.