Skip to content

Commit

Permalink
bugfix...
Browse files Browse the repository at this point in the history
Signed-off-by: Alex A. Naanou <[email protected]>
  • Loading branch information
flynx committed Nov 2, 2023
1 parent 0d4d766 commit bb29ffb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
11 changes: 8 additions & 3 deletions experiments/outline-editor/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,17 @@
height: calc(2 * var(--item-padding) + 1em);
overflow: hidden;
resize: none;
opacity: 0;

/* show/hide node's view/code... */
/*&:focus+.view,*/
&:not(:focus) {
opacity: 0;
&:focus {
position: relative;
opacity: 1;
}
/* hide .view content but show before/after -- keep bulets and touch zones... */
&:focus+.view {
position: absolute;
top: 0;
visibility: hidden;

&:before,
Expand All @@ -175,6 +179,7 @@
}

/* click through the .view text to the .code */
/* NOTE: .view visibility is handled in .code above... */
&>.view {
position: relative;
pointer-events: none;
Expand Down
16 changes: 0 additions & 16 deletions experiments/outline-editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@
//---------------------------------------------------------------------
// Helpers...

// XXX do a caret api...

// XXX only for text areas...
var atLine = function(elem, index){
// XXX add support for range...
var text = elem.value
var lines = text.split(/\n/g).length
var line = elem.caretLine

// XXX STUB index handling...
if((index == -1 && line == lines)
|| (index == 0 && line == 1)){
return true }
return false }


/*
function clickPoint(x,y){
document
Expand Down
2 changes: 0 additions & 2 deletions experiments/outline-editor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
-
- ## Bugs:
focused:: true
- BUG: if changing style expands the block vertically it will not update size...
- # when edited, the text here will get re-wrapped but will not get resized
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
- FF:
- zooming on edited field
Expand Down

0 comments on commit bb29ffb

Please sign in to comment.