@@ -49,6 +49,7 @@ export default {
headerContainer: null,
closeButton: null,
outsideClickListener: null,
+ documentKeydownListener: null,
updated() {
if (this.visible) {
this.containerVisible = this.visible;
@@ -71,6 +72,7 @@ export default {
onEnter() {
this.$emit('show');
this.focus();
+ this.bindDocumentKeyDownListener();
if (this.autoZIndex) {
ZIndexUtils.set('modal', this.mask, this.baseZIndex || this.$primevue.config.zIndex.modal);
@@ -92,6 +94,7 @@ export default {
ZIndexUtils.clear(this.mask);
}
+ this.unbindDocumentKeyDownListener();
this.containerVisible = false;
this.disableDocumentSettings();
this.$emit('after-hide');
@@ -154,6 +157,18 @@ export default {
closeButtonRef(el) {
this.closeButton = el;
},
+ bindDocumentKeyDownListener() {
+ if (!this.documentKeydownListener) {
+ this.documentKeydownListener = this.onKeydown;
+ document.addEventListener('keydown', this.documentKeydownListener);
+ }
+ },
+ unbindDocumentKeyDownListener() {
+ if (this.documentKeydownListener) {
+ document.removeEventListener('keydown', this.documentKeydownListener);
+ this.documentKeydownListener = null;
+ }
+ },
bindOutsideClickListener() {
if (!this.outsideClickListener) {
this.outsideClickListener = (event) => {
diff --git a/components/lib/tooltip/style/TooltipStyle.js b/components/lib/tooltip/style/TooltipStyle.js
index 3ca0db2a9..d1293800f 100644
--- a/components/lib/tooltip/style/TooltipStyle.js
+++ b/components/lib/tooltip/style/TooltipStyle.js
@@ -30,6 +30,7 @@ const css = `
height: 0;
border-color: transparent;
border-style: solid;
+ scale: 2;
}
.p-tooltip-right .p-tooltip-arrow {
diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json
index 67b31776b..f63bc2385 100644
--- a/doc/common/apidoc/index.json
+++ b/doc/common/apidoc/index.json
@@ -8608,6 +8608,14 @@
"default": "",
"description": "Used to pass attributes to the body's DOM element."
},
+ {
+ "name": "caption",
+ "optional": true,
+ "readonly": false,
+ "type": "CardPassThroughOptionType",
+ "default": "",
+ "description": "Used to pass attributes to the caption's DOM element."
+ },
{
"name": "title",
"optional": true,
diff --git a/doc/nuxt/StyledModeDoc.vue b/doc/nuxt/StyledModeDoc.vue
index df0bbc777..13d162ceb 100644
--- a/doc/nuxt/StyledModeDoc.vue
+++ b/doc/nuxt/StyledModeDoc.vue
@@ -27,7 +27,7 @@ export default {
code1: {
basic: `