Skip to content

Commit

Permalink
Re-fix #84
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrl committed Aug 18, 2016
1 parent a869559 commit 3a7b941
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions build/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3591,6 +3591,7 @@ function errorimage($text, $target_size)
<script>
// Adapted from https://jsfiddle.net/2wAzx/13/
document.querySelector(\"[name=content]\").addEventListener(\"keydown\", (event) => {
if(event.keyCode !== 9) return true;
var currentValue = event.target.value, startPos = event.target.selectionStart, endPos = event.target.selectionEnd;
event.target.value = currentValue.substring(0, startPos) + \"\\t\" + currentValue.substring(endPos);
event.target.selectionStart = event.target.selectionEnd = startPos + 1;
Expand Down
2 changes: 1 addition & 1 deletion module_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"author": "Starbeamrainbowlabs",
"description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
"id": "page-edit",
"lastupdate": 1471548511,
"lastupdate": 1471549914,
"optional": false
},
{
Expand Down
1 change: 1 addition & 0 deletions modules/page-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<script>
// Adapted from https://jsfiddle.net/2wAzx/13/
document.querySelector(\"[name=content]\").addEventListener(\"keydown\", (event) => {
if(event.keyCode !== 9) return true;
var currentValue = event.target.value, startPos = event.target.selectionStart, endPos = event.target.selectionEnd;
event.target.value = currentValue.substring(0, startPos) + \"\\t\" + currentValue.substring(endPos);
event.target.selectionStart = event.target.selectionEnd = startPos + 1;
Expand Down

0 comments on commit 3a7b941

Please sign in to comment.