mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
exploring new ctretegies to fix a very annoying bug...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4ef1be394c
commit
71b365c8d7
@ -191,6 +191,15 @@ var getMarkdownOffset = function(markdown, text, i){
|
|||||||
return map[i] }
|
return map[i] }
|
||||||
//*/
|
//*/
|
||||||
|
|
||||||
|
getText = function(elem, res=[]){
|
||||||
|
for(var n of elem.childNodes){
|
||||||
|
if(n.nodeType == n.TEXT_NODE){
|
||||||
|
res.push(n.textContent)
|
||||||
|
} else {
|
||||||
|
getText(n, res) } }
|
||||||
|
return res }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|||||||
@ -48,15 +48,14 @@ var setup = function(){
|
|||||||
-
|
-
|
||||||
- ## Bugs:
|
- ## Bugs:
|
||||||
focused:: true
|
focused:: true
|
||||||
- BUG: caret placement is off again...
|
|
||||||
- ```
|
|
||||||
text text text
|
|
||||||
```
|
|
||||||
text text text (a click here is offset right)
|
|
||||||
- the offset's amount depends on where in the text we click after the code block, the farther right the greater the offset...
|
|
||||||
- this seems to be the same as the below `div` case... (TEST)
|
|
||||||
- BUG: caret positioning broken
|
- BUG: caret positioning broken
|
||||||
- *TODO*::
|
- *TODO*::
|
||||||
|
- ```
|
||||||
|
text text text
|
||||||
|
```
|
||||||
|
text text text (a click here is offset right)
|
||||||
|
- the offset's amount depends on where in the text we click after the code block, the farther right the greater the offset...
|
||||||
|
- `getCharOffset(..)` produces correct results, the problem is in `getMarkdownOffset(..)`
|
||||||
- text text text
|
- text text text
|
||||||
<div>
|
<div>
|
||||||
block element
|
block element
|
||||||
@ -82,6 +81,9 @@ var setup = function(){
|
|||||||
- text text text
|
- text text text
|
||||||
text text text
|
text text text
|
||||||
text text text
|
text text text
|
||||||
|
- text text text
|
||||||
|
text & text & text
|
||||||
|
text text text
|
||||||
- M
|
- M
|
||||||
M can't place cursor before first char
|
M can't place cursor before first char
|
||||||
M
|
M
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user