question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Schedule: Poll Inconsistently Causes a Scroll Up

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
christophs78commented, Oct 13, 2020

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.

0reactions
tandraschkocommented, Oct 13, 2020

Yep

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found