Fix autocomplete on Chrome, because contenteditable and shadowRoots are tricksy, and this module for @mentions is aging. #65
This commit is contained in:
@ -483,8 +483,8 @@ class TributeRange {
|
||||
|
||||
getDocument() {
|
||||
let iframe;
|
||||
if (this.tribute.current.collection) {
|
||||
iframe = this.tribute.current.collection.iframe;
|
||||
if (this.tribute.current.collection[0].iframe) {
|
||||
iframe = this.tribute.current.collection[0].iframe;
|
||||
}
|
||||
|
||||
if (!iframe) {
|
||||
@ -653,8 +653,8 @@ class TributeRange {
|
||||
}
|
||||
|
||||
getWindowSelection() {
|
||||
if (this.tribute.collection.iframe) {
|
||||
return this.tribute.collection.iframe.contentWindow.getSelection()
|
||||
if (this.tribute.collection[0].iframe) {
|
||||
return this.tribute.collection[0].iframe.getSelection()
|
||||
}
|
||||
|
||||
return window.getSelection()
|
||||
|
Reference in New Issue
Block a user