Skip to content

Commit 77f33c4

Browse files
committed
Merge remote-tracking branch 'foxo-tech/dev' into merge/fix-panel-out-of-range
2 parents 197d4d5 + 65795d2 commit 77f33c4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/At.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,18 @@ export default {
285285
this.$emit('input', el.innerHTML)
286286
287287
const range = getPrecedingRange()
288+
288289
if (range) {
290+
if (keep) {
291+
// exit the function if the range is not inside this.$el
292+
let container = range.commonAncestorContainer;
293+
while (container) {
294+
if (container === this.$el) break;
295+
container = container.parentElement;
296+
if (!container) return;
297+
}
298+
}
299+
289300
const { atItems, avoidEmail, allowSpaces, showUnique } = this
290301
291302
let show = true

0 commit comments

Comments
 (0)