This should hopefully fix the issue we were seeing where the docs
would not render properly immediately after a release because CDNjs
has a delay in updating versions. jsdelivr does not have this delay,
so we shouldn't have any many rendering issues.
* Uncomment the deploy_github job for GPR
* Automatically add private scope to package for GPM
This is requires in order to deploy to GitHub package manager since
all packages must be scoped to the organization that they are being
deployed to. Because of how publishing scoped packages works with
NPM, there is no easier way to rename a package that is being pushed
to both a scoped and unscoped registry.
* Don't run NPM deploy if it's not a release
There was a change last week that now allows jobs to be filtered
entirely, so this now works like we had originally hoped.
* Tag branch pushes with commit
This is needed because you cannot overwrite a version on NPM, so the
previous plan of just using the prelease version would only work for
a single commit.
* Fixed invalid version identifier
This fixes an error which is called out in jQuery Migrate but
probably never happens in real life. This is because we call
`jQuery.fn.offset` without checking if the element is in the
document. Based on testing done here and within the MediaWiki
team, I'm pretty sure jQuery never actually implemented explicit
checks and this jQuery Migrate warning is just to cover the case
where a browser might start returning inconsistnet results. And
we could at least reproduce the inconsistency, so that's something.
We now default the offset to 0/0 if the parent element happens to
not be in the document. This appears to be what jQuery used to do
in the past, and generally appears to be what people expect in
these cases.
This fixes#5584.
This is how it used to work pre-4.0.9, where the bound handlers for
resizing and positioning the dropdown were bound at the first time
that the dropdown was opened. This was changed for the 4.0.9 release
as a part of 3f75227a693 where it was not clear why this late binding
was happening, so it was removed to simplify the code.
The late binding is necessary because the handlers within results for
generating the results, and thus the content within the dropdown,
are bound after the handlers for the dropdown are bound. This results
in situations where the handlers for positioning the dropdown are
bound before the dropdown is updated with content, resulting in the
positioning being calculated for the old content and thus being
incorrectly placed. By binding the positioning handlers after the
dropdow is opened for the first time, we can ensure that the
positioning handlers are bound after the result handlers, so we
won't have to worry about this issue.
The handlers are only bound once because they only need to perform
all the calculations a single time. There is no need to keep checking
all of the calculated styles more than we need to, so this is guarded
by a flag which ensures it is only bound a single time per dropdown.
Fixes#5619Fixes#5620