apache/airflow-site

Cannot select Airflow version on CLI and Macros Documentation

wolfier opened this issue · 2 comments

Apache Airflow version: N/A

Kubernetes version (if you are using kubernetes) (use kubectl version): N/A

Environment:

  • Chrome Version: Version 87.0.4280.88 (Official Build) (x86_64)
  • Safari Version: Version 14.0 (15610.1.28.1.9, 15610)

What happened:

I was unable to select the version for the documentation page on CLI and Macros

What you expected to happen:

I expect to be able to select the version and for there to be no errors on the console.

How to reproduce it:

Go to the Macros or CLI reference documentation.

Check chrome console.

CLI

Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#Positional%20Arguments' is not a valid selector.

Screen Shot 2020-12-18 at 3 25 41 PM

Macros

Uncaught TypeError: Cannot read property 'offsetTop' of null

Screen Shot 2020-12-18 at 3 25 34 PM

ashb commented

Thanks Alan -- have moved this in to the 'airflow-site' repo.

I confirm. I have this problem too. This issue appears to have been reported previously. See: #254

I took a quick look at it and it seems to me it is enough to make the following change to this problem, but I don't have time to check it and update all the files on docs-archive.

targetElement = document.querySelector(`#${target}`);

-      targetElement = document.querySelector(`#${target}`);
+      targetElement = document.getElementById(target);

When an element has an ID that contains a dot symbol, the expression parser gets lost and cannot find the element because it starts interpreting part of the expression as a class selector.
@wolfier Can you see if this fixes this problem?