Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
2c074007
Commit
2c074007
authored
May 09, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复ie下range的报错
parent
181512d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
editor.range.js
src/module/editor.range.js
+3
-0
editor.receiver.js
src/module/editor.receiver.js
+3
-1
No files found.
src/module/editor.range.js
View file @
2c074007
...
@@ -3,6 +3,9 @@ Minder.Range = kity.createClass('Range',{
...
@@ -3,6 +3,9 @@ Minder.Range = kity.createClass('Range',{
this
.
nativeRange
=
document
.
createRange
();
this
.
nativeRange
=
document
.
createRange
();
this
.
nativeSel
=
window
.
getSelection
();
this
.
nativeSel
=
window
.
getSelection
();
},
},
hasNativeRange
:
function
(){
return
this
.
nativeSel
.
rangeCount
!=
0
;
},
select
:
function
(){
select
:
function
(){
var
start
=
this
.
nativeRange
.
startContainer
;
var
start
=
this
.
nativeRange
.
startContainer
;
if
(
start
.
nodeType
==
1
&&
start
.
childNodes
.
length
==
0
){
if
(
start
.
nodeType
==
1
&&
start
.
childNodes
.
length
==
0
){
...
...
src/module/editor.receiver.js
View file @
2c074007
...
@@ -83,6 +83,9 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -83,6 +83,9 @@ Minder.Receiver = kity.createClass( 'Receiver', {
var
keys
=
KityMinder
.
keymap
;
var
keys
=
KityMinder
.
keymap
;
function
setTextToContainer
()
{
function
setTextToContainer
()
{
if
(
!
me
.
range
.
hasNativeRange
()){
return
;
}
var
text
=
me
.
container
.
textContent
.
replace
(
/
[\u
200b
\t\r\n]
/g
,
''
);
var
text
=
me
.
container
.
textContent
.
replace
(
/
[\u
200b
\t\r\n]
/g
,
''
);
if
(
me
.
textShape
.
getOpacity
()
==
0
)
{
if
(
me
.
textShape
.
getOpacity
()
==
0
)
{
...
@@ -176,7 +179,6 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -176,7 +179,6 @@ Minder.Receiver = kity.createClass( 'Receiver', {
break
;
break
;
case
'beforekeyup'
:
case
'beforekeyup'
:
switch
(
keyCode
)
{
switch
(
keyCode
)
{
case
keymap
.
Enter
:
case
keymap
.
Enter
:
case
keymap
.
Tab
:
case
keymap
.
Tab
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment