mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 18:10:09 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a24eb02876
commit
cd20c5ab3e
@ -69,7 +69,7 @@ var getCharOffset = function(elem, x, y, c){
|
|||||||
return Math.abs(b.x - x) <= Math.abs(prev.x - x) ?
|
return Math.abs(b.x - x) <= Math.abs(prev.x - x) ?
|
||||||
c + i
|
c + i
|
||||||
: c + i - 1 } }
|
: c + i - 1 } }
|
||||||
c += i
|
c += i - 1
|
||||||
// html node...
|
// html node...
|
||||||
} else {
|
} else {
|
||||||
var res = getCharOffset(e, x, y, c)
|
var res = getCharOffset(e, x, y, c)
|
||||||
@ -1974,6 +1974,7 @@ var Outline = {
|
|||||||
elem.selectionStart = elem.value.length
|
elem.selectionStart = elem.value.length
|
||||||
elem.selectionEnd = elem.value.length
|
elem.selectionEnd = elem.value.length
|
||||||
} else {
|
} else {
|
||||||
|
console.log('---', c)
|
||||||
var m = getMarkdownOffset(elem.value, view.innerText, c)
|
var m = getMarkdownOffset(elem.value, view.innerText, c)
|
||||||
elem.focus()
|
elem.focus()
|
||||||
elem.selectionStart = c + m
|
elem.selectionStart = c + m
|
||||||
|
|||||||
@ -60,15 +60,20 @@ HTMLTextAreaElement.prototype.getTextGeometry = function(){
|
|||||||
|
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
display: 'block',
|
display: 'block',
|
||||||
|
/* DEBUG...
|
||||||
|
top: '0px',
|
||||||
|
left: '0px',
|
||||||
|
/*/
|
||||||
top: '-100%',
|
top: '-100%',
|
||||||
left: '-100%',
|
left: '-100%',
|
||||||
|
//*/
|
||||||
width: style.width,
|
width: style.width,
|
||||||
height: style.height,
|
height: style.height,
|
||||||
|
|
||||||
padding: style.padding,
|
padding: style.padding,
|
||||||
|
|
||||||
boxSizing: style.boxSizing,
|
boxSizing: style.boxSizing,
|
||||||
//whiteSpace: 'pre-wrap',
|
whiteSpace: style.whiteSpace,
|
||||||
|
|
||||||
outline: 'solid 1px red',
|
outline: 'solid 1px red',
|
||||||
|
|
||||||
|
|||||||
@ -48,9 +48,6 @@ var setup = function(){
|
|||||||
-
|
-
|
||||||
- ## Bugs:
|
- ## Bugs:
|
||||||
focused:: true
|
focused:: true
|
||||||
- BUG: focus at times seems to be biased a bit to the right -- the caret is placed to the right from where expected...
|
|
||||||
-
|
|
||||||
_this seems to only affect text with leading whitespace only, like this._
|
|
||||||
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
|
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
|
||||||
- FF:
|
- FF:
|
||||||
- zooming on edited field
|
- zooming on edited field
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user