Comments (6)
Description in this ticket:
#11818
"Since PF 13.0.6, setting the focus with the 'focus' attribute in the 'dialog' no longer works. The element briefly gains focus and then immediately loses it again. This still worked in PF 13.0.5."
looked like it could be related
from primefaces.
Looks like it is caused by this change:
bc7bc91
from primefaces.
Thanks for the reproducer let me debug this issue.
from primefaces.
@martin654 great reproducer this was tricky to debug. What is happening is both dialogs called show
before the first hide
is executed and the delay is causing the focus change. here is the debug.
applyFocus ajaxDialog
Start AJAX
applyFocus searchDialog
Complete AJAX
returnFocus
<button id="frmTest:openDialogButton"
Working on a fix
from primefaces.
I included a monkeyPatch in your test.js can you give it a try?
if (PrimeFaces.widget.Dialog) {
PrimeFaces.widget.Dialog.prototype.returnFocus = function () {
var el = this.focusedElementBeforeDialogOpened;
if (el) {
// #11860 do not return focus if other dialogs are still open
var otherDialogs = $(".ui-dialog:visible").length > 0;
if (otherDialogs) {
return;
}
setTimeout(function () {
el.focus({ preventScroll: true });
}, 100);
}
};
}
from primefaces.
@melloware Thank you for the fix, works great in 13.0.10.
from primefaces.
Related Issues (20)
- Splitter: panel is not draggable by touch to resize on the android tablet.
- Menu: JS recursion error 14.0.1 HOT 8
- Tooltip: autoHide="false" never gets hidden
- Media: Navigating to a given page number in a multi-page PDF file HOT 1
- `updateExpansionAria` called on wrong `this` HOT 1
- CommandLink: Tabindex gets removed HOT 5
- TextEditor doesn't detect change of contents HOT 2
- Menu: not working in PF 14.0.1 HOT 3
- JavaEE JAR contains JakartaEE URN taglib HOT 3
- Picklist: "An error occurred when processing your submitted information" HOT 12
- CSP: primefaces.nonce from request not validated HOT 24
- MenuButton: not disappearing after clicking in PF 14.0.1 HOT 3
- WidgetVar: not available after updating version from 14.0.0 to 14.0.1 HOT 7
- Sticky effect: problem when combine with menu/datatable and dialog HOT 20
- Sticky effect: problem when combine with menu/datatable and dialog HOT 1
- DatePicker: Add `viewDate` property HOT 4
- autoComplete: highlight not working for custom content when removing style of the outputText HOT 1
- SelectOneButton: badges to work and have icon/iconPos parameters for each item HOT 7
- Showcase: CRUD page can't create new product HOT 2
- DataTable Showcase: add missing POJOs and ENUM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primefaces.