mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 01:50:07 +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) ?
|
||||
c + i
|
||||
: c + i - 1 } }
|
||||
c += i
|
||||
c += i - 1
|
||||
// html node...
|
||||
} else {
|
||||
var res = getCharOffset(e, x, y, c)
|
||||
@ -1974,6 +1974,7 @@ var Outline = {
|
||||
elem.selectionStart = elem.value.length
|
||||
elem.selectionEnd = elem.value.length
|
||||
} else {
|
||||
console.log('---', c)
|
||||
var m = getMarkdownOffset(elem.value, view.innerText, c)
|
||||
elem.focus()
|
||||
elem.selectionStart = c + m
|
||||
|
||||
@ -60,15 +60,20 @@ HTMLTextAreaElement.prototype.getTextGeometry = function(){
|
||||
|
||||
position: 'fixed',
|
||||
display: 'block',
|
||||
/* DEBUG...
|
||||
top: '0px',
|
||||
left: '0px',
|
||||
/*/
|
||||
top: '-100%',
|
||||
left: '-100%',
|
||||
//*/
|
||||
width: style.width,
|
||||
height: style.height,
|
||||
|
||||
padding: style.padding,
|
||||
|
||||
boxSizing: style.boxSizing,
|
||||
//whiteSpace: 'pre-wrap',
|
||||
whiteSpace: style.whiteSpace,
|
||||
|
||||
outline: 'solid 1px red',
|
||||
|
||||
|
||||
@ -48,9 +48,6 @@ var setup = function(){
|
||||
-
|
||||
- ## Bugs:
|
||||
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...
|
||||
- FF:
|
||||
- zooming on edited field
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user