Schedule: Poll Inconsistently Causes a Scroll Up
See original GitHub issueDescribe the defect
In the snippet below, when I scroll to the bottom of the page (such that the schedule header isn’t visible anymore), then no problem occurs following a poll. However, if I reduce height: 10000px
to a smaller number, such as 200px
, then the page keeps scrolling to the top after each poll.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<f:view>
<h:head>
</h:head>
<h:body>
<h:form>
<p:poll update="schedule"/>
<div style="height: 10000px"/>
<p:schedule id="schedule" value="#{myController.schedule}"/>
</h:form>
</h:body>
</f:view>
</html>
import javax.enterprise.context.RequestScoped;
import org.primefaces.model.DefaultScheduleModel;
import org.springframework.stereotype.Controller;
@RequestScoped
@Controller
public class MyController {
private DefaultScheduleModel schedule = new DefaultScheduleModel();
public DefaultScheduleModel getSchedule() {
return schedule;
}
public void setSchedule(DefaultScheduleModel schedule) {
this.schedule = schedule;
}
}
Environment:
- PF Version: 8.0
- JSF version: joinfaces 4.3.3 (primefaces-spring-boot-starter, mojarra-spring-boot-starter).
- Affected browsers: Chrome.
Expected behavior There should be no scrolling to top in both cases.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
FindTime organizer dashboard - Microsoft Support
The FindTime organizer dashboard allows organizers to view all the polls they have created in one place, manage their polls, and change default...
Read more >Basic Steps for Conducting Zoom Meeting Part 2
You select one of these for each of your questions. In a Zoom poll, you cannot have an open-ended question, but you can...
Read more >Known Issues · Releases · Summer '22 - Trailblazer Community
A known issue is causing recipe jobs to fail with a message similar to: "DataflowInstance 03C230000016NtAEAU cancelled. Hmm, that didn't work. Please try ......
Read more >Polling for meetings - Zoom Support
You will be able to launch the poll during your meeting and gather the responses from your participants. You also have the ability...
Read more >REDCap Change Log - Eastern Virginia Medical School
Bug fix: A calculation error might occur on a data entry form or survey page whenever a calculated field utilizes one of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe it would be better to update with
PF('myschedule').update();
JS instead of p:poll. eg triggered by https://www.w3schools.com/jsref/met_win_setinterval.asp Also see https://primefaces.github.io/primefaces/8_0/#/components/schedule?id=ajax-updates.Yep