Skip to content

forked-to: select_dom(...) is undefined #5609

Closed

Description

@cheap-glitch

Please ensure:

  • The bug is caused by Refined GitHub. It doesn't happen if I disable the extension.
  • The bug happens after clearing extension cache. The "Clear cache" button below can also be found at the bottom of the options page.

Example URLs

Go to https://github.com/refined-github/refined-github/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc and open an issue. Same with the PR list.

Extension version

22.4.21

Browser(s) used

Firefox

Description

❌ forked-to refined-github.js:3859:17
	init@moz-extension://6ffeab5e-837d-450e-9fa5-fe3ec6a7ee9f/refined-github.js:8563:146
	async*runFeature@moz-extension://6ffeab5e-837d-450e-9fa5-fe3ec6a7ee9f/refined-github.js:3902:26
	setupPageLoad@moz-extension://6ffeab5e-837d-450e-9fa5-fe3ec6a7ee9f/refined-github.js:3910:40

This only occurs when navigating from the Issue/PR lists to an Issue/PR page, which makes me suspect a de-duplication bug.

Include in this issue:

  • Screenshots/video/gif demonstrating the bug, if it’s visual
  • Console errors, if any

Activity

  1. gengjiawen commented on May 6, 2022

    @gengjiawen

    Looks like need to make awaitDomReady to true #5596 (comment)

    Is there an easy way to verify this on local ?

  2. gengjiawen commented on May 6, 2022

    @gengjiawen

    Removing it works on my local.

  3. fregante commented on May 7, 2022

    @fregante
    Member

    That's right, init is called before DOM ready, so we must use elementReady somewhere, likely inside updateUI (the select inside init is explicitly meant to work on ajaxed loads, not first loads, and ajaxed loads are not streamed)

    if (forks && select.exists('.rgh-forked-button')) {

    Something like this should work, without assigning it to anything: await elementReady('.page-actions')

  4. added
    small
    on May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedbugsmall

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions