@tiptap/extension-bubble-menu
Advanced tools
Comparing version 2.0.0-beta.7 to 2.0.0-beta.8
@@ -6,3 +6,3 @@ # Change Log | ||
# [2.0.0-beta.7](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-bubble-menu@2.0.0-beta.6...@tiptap/extension-bubble-menu@2.0.0-beta.7) (2021-04-16) | ||
# [2.0.0-beta.8](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.7...@tiptap/extension-bubble-menu@2.0.0-beta.8) (2021-04-22) | ||
@@ -12,10 +12,21 @@ | ||
* fix tippy for react ([398fc7f](https://github.com/ueberdosis/tiptap-next/commit/398fc7f210b9d5449cbb00543ddf4af768552b9c)) | ||
* fix a bug for empty node selection where the bubble menu should not be visible, fix [#1023](https://github.com/ueberdosis/tiptap/issues/1023) ([8ed220a](https://github.com/ueberdosis/tiptap/commit/8ed220a12de48b3c14e903b271d7f50aff6313f4)) | ||
# [2.0.0-beta.7](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.6...@tiptap/extension-bubble-menu@2.0.0-beta.7) (2021-04-16) | ||
### Bug Fixes | ||
* fix tippy for react ([398fc7f](https://github.com/ueberdosis/tiptap/commit/398fc7f210b9d5449cbb00543ddf4af768552b9c)) | ||
### Features | ||
* add coordsAtPos and posToClientRect helper methods ([8dab614](https://github.com/ueberdosis/tiptap-next/commit/8dab6144a661e4c90f33d9d2f300882009eadd46)) | ||
* add tippyOptions prop ([9a56f66](https://github.com/ueberdosis/tiptap-next/commit/9a56f666a118ca7c59a6f1f67f40e6490e20d3b8)) | ||
* remove keepInBounds ([d7282f1](https://github.com/ueberdosis/tiptap-next/commit/d7282f168bc6cfae4e1630d14bb8462bc135b254)) | ||
* add coordsAtPos and posToClientRect helper methods ([8dab614](https://github.com/ueberdosis/tiptap/commit/8dab6144a661e4c90f33d9d2f300882009eadd46)) | ||
* add tippyOptions prop ([9a56f66](https://github.com/ueberdosis/tiptap/commit/9a56f666a118ca7c59a6f1f67f40e6490e20d3b8)) | ||
* remove keepInBounds ([d7282f1](https://github.com/ueberdosis/tiptap/commit/d7282f168bc6cfae4e1630d14bb8462bc135b254)) | ||
@@ -26,3 +37,3 @@ | ||
# [2.0.0-beta.6](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-bubble-menu@2.0.0-beta.5...@tiptap/extension-bubble-menu@2.0.0-beta.6) (2021-04-15) | ||
# [2.0.0-beta.6](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.5...@tiptap/extension-bubble-menu@2.0.0-beta.6) (2021-04-15) | ||
@@ -35,3 +46,3 @@ **Note:** Version bump only for package @tiptap/extension-bubble-menu | ||
# [2.0.0-beta.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-bubble-menu@2.0.0-beta.4...@tiptap/extension-bubble-menu@2.0.0-beta.5) (2021-04-01) | ||
# [2.0.0-beta.5](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.4...@tiptap/extension-bubble-menu@2.0.0-beta.5) (2021-04-01) | ||
@@ -44,3 +55,3 @@ **Note:** Version bump only for package @tiptap/extension-bubble-menu | ||
# [2.0.0-beta.4](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-bubble-menu@2.0.0-beta.3...@tiptap/extension-bubble-menu@2.0.0-beta.4) (2021-04-01) | ||
# [2.0.0-beta.4](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.3...@tiptap/extension-bubble-menu@2.0.0-beta.4) (2021-04-01) | ||
@@ -53,3 +64,3 @@ **Note:** Version bump only for package @tiptap/extension-bubble-menu | ||
# [2.0.0-beta.3](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-bubble-menu@2.0.0-beta.2...@tiptap/extension-bubble-menu@2.0.0-beta.3) (2021-03-31) | ||
# [2.0.0-beta.3](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.2...@tiptap/extension-bubble-menu@2.0.0-beta.3) (2021-03-31) | ||
@@ -62,3 +73,3 @@ **Note:** Version bump only for package @tiptap/extension-bubble-menu | ||
# [2.0.0-beta.2](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-bubble-menu@2.0.0-beta.1...@tiptap/extension-bubble-menu@2.0.0-beta.2) (2021-03-31) | ||
# [2.0.0-beta.2](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.1...@tiptap/extension-bubble-menu@2.0.0-beta.2) (2021-03-31) | ||
@@ -65,0 +76,0 @@ **Note:** Version bump only for package @tiptap/extension-bubble-menu |
@@ -63,4 +63,7 @@ 'use strict'; | ||
} | ||
const { from, to, empty } = selection; | ||
if (empty) { | ||
const { from, to, empty, $anchor, } = selection; | ||
// Sometime check for `empty` is not enough. | ||
// Doubleclick an empty paragraph returns a node size of 2. | ||
// So we check also for an empty text size. | ||
if (empty || !$anchor.parent.textContent) { | ||
this.hide(); | ||
@@ -67,0 +70,0 @@ return; |
@@ -55,4 +55,7 @@ import { posToDOMRect, Extension } from '@tiptap/core'; | ||
} | ||
const { from, to, empty } = selection; | ||
if (empty) { | ||
const { from, to, empty, $anchor, } = selection; | ||
// Sometime check for `empty` is not enough. | ||
// Doubleclick an empty paragraph returns a node size of 2. | ||
// So we check also for an empty text size. | ||
if (empty || !$anchor.parent.textContent) { | ||
this.hide(); | ||
@@ -59,0 +62,0 @@ return; |
@@ -61,4 +61,7 @@ (function (global, factory) { | ||
} | ||
const { from, to, empty } = selection; | ||
if (empty) { | ||
const { from, to, empty, $anchor, } = selection; | ||
// Sometime check for `empty` is not enough. | ||
// Doubleclick an empty paragraph returns a node size of 2. | ||
// So we check also for an empty text size. | ||
if (empty || !$anchor.parent.textContent) { | ||
this.hide(); | ||
@@ -65,0 +68,0 @@ return; |
{ | ||
"name": "@tiptap/extension-bubble-menu", | ||
"description": "bubble-menu extension for tiptap", | ||
"version": "2.0.0-beta.7", | ||
"version": "2.0.0-beta.8", | ||
"homepage": "https://tiptap.dev", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "ea9f5410915f45f7ba12d5c816965976f1956862" | ||
"gitHead": "4b68a369a17269063b007008f7c5cba2f83f1f2c" | ||
} |
@@ -14,2 +14,2 @@ # @tiptap/extension-bubble-menu | ||
## License | ||
tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap-next/blob/main/LICENSE.md). | ||
tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md). |
@@ -91,5 +91,13 @@ import { Editor, posToDOMRect } from '@tiptap/core' | ||
const { from, to, empty } = selection | ||
const { | ||
from, | ||
to, | ||
empty, | ||
$anchor, | ||
} = selection | ||
if (empty) { | ||
// Sometime check for `empty` is not enough. | ||
// Doubleclick an empty paragraph returns a node size of 2. | ||
// So we check also for an empty text size. | ||
if (empty || !$anchor.parent.textContent) { | ||
this.hide() | ||
@@ -96,0 +104,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
729309
1007