Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
f0b12955
Commit
f0b12955
authored
May 23, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates #1098 IE doesn't support `document.contains`
parent
9500900f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
src/converse-bookmarks.js
src/converse-bookmarks.js
+1
-2
src/converse-roomslist.js
src/converse-roomslist.js
+1
-2
src/utils/core.js
src/utils/core.js
+8
-0
No files found.
src/converse-bookmarks.js
View file @
f0b12955
...
...
@@ -469,8 +469,7 @@
insertIntoControlBox
()
{
const
controlboxview
=
_converse
.
chatboxviews
.
get
(
'
controlbox
'
);
if
(
!
_
.
isUndefined
(
controlboxview
)
&&
!
_converse
.
root
.
contains
(
this
.
el
))
{
if
(
!
_
.
isUndefined
(
controlboxview
)
&&
!
u
.
rootContains
(
_converse
.
root
,
this
.
el
))
{
const
el
=
controlboxview
.
el
.
querySelector
(
'
.bookmarks-list
'
);
if
(
!
_
.
isNull
(
el
))
{
el
.
parentNode
.
replaceChild
(
this
.
el
,
el
);
...
...
src/converse-roomslist.js
View file @
f0b12955
...
...
@@ -181,8 +181,7 @@
insertIntoControlBox
()
{
const
controlboxview
=
_converse
.
chatboxviews
.
get
(
'
controlbox
'
);
if
(
!
_
.
isUndefined
(
controlboxview
)
&&
!
_converse
.
root
.
contains
(
this
.
el
))
{
if
(
!
_
.
isUndefined
(
controlboxview
)
&&
!
u
.
rootContains
(
_converse
.
root
,
this
.
el
))
{
const
el
=
controlboxview
.
el
.
querySelector
(
'
.open-rooms-list
'
);
if
(
!
_
.
isNull
(
el
))
{
el
.
parentNode
.
replaceChild
(
this
.
el
,
el
);
...
...
src/utils/core.js
View file @
f0b12955
...
...
@@ -654,6 +654,14 @@
};
};
u
.
rootContains
=
function
(
root
,
el
)
{
// The document element does not have the contains method in IE.
if
(
root
===
document
&&
!
root
.
contains
)
{
return
document
.
head
.
contains
(
el
)
||
document
.
body
.
contains
(
el
);
}
return
root
.
contains
?
root
.
contains
(
el
)
:
window
.
HTMLElement
.
prototype
.
contains
.
call
(
root
,
el
);
};
u
.
createFragmentFromText
=
function
(
markup
)
{
/* Returns a DocumentFragment containing DOM nodes based on the
* passed-in markup text.
...
...
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