The code replacing @CODE in wrapper.js was written so that it expected
both the code and the next line to start in the first column. This commit
adjusts the regex so to get rid of that assumption and to work properly
regardless of number of lines with comments after this block.
While this is technically not necessary for our code, contributors sometimes
re-format the wrapper file in their pull requests and the error
messages they get don't tell them what's the real problem with their code.
Docs: Remove supported jQuery versions from ISSUE_TEMPLATE.md
We no longer support jQuery 1.x/2.x and mentioning 3.x would just mean the text
gets out of date once we release jQuery 4. We only really support the latest
jQuery version so let's make that clear.
Core: rnotwhite -> rhtmlnotwhite and jQuery.trim -> stripAndCollapse
- Renames and changes rnotwhite to focus on HTML whitespace chars
- Change internal use of jQuery.trim to more accurate strip and collapse
- Adds tests to ensure HTML space characters are retained where valid
- Doesn't add tests where the difference is inconsequential and
existing tests are adequate.
Build: Update promises-aplus-tests for compat with Node 7
The older promises-aplus-tests was relying on old Mocha that, in turn,
used an obsolete graceful-fs version that is not guaranteed to work fine
with the upcoming Node 7 and later.
Tests: Disable a whitespace-setting test in Edge 14
Working around this problem would require us to skip setting whitespace-only
values except when they're valid which would be very fragile. Another option
would be to set the value and see if it succeeded and then react to that.
We've tried something like that in the past to be able to overwrite !important
styles (see 24e5879) but it broke the CSS cascade (see
https://bugs.jquery.com/ticket/14836#comment:5) and was triggering
MutationObserver callbacks too often so it was reverted in PR gh-1532.
Timmy Willison [Mon, 15 Aug 2016 15:41:11 +0000 (11:41 -0400)]
Core: expose noConflict in AMD mode
- For compability reasons, we had already added the global
in AMD mode, but without noConflict. This adds back noConflict
to AMD (which fixes noConflict mode in the tests).
Currently the "all" target for the eslint task includes way more than
the "dev" & "dist" targets combined and those 2 tasks are the one run in
`npm test`.
ESLint 3.0 drops support for Node.js older than 4.x. To be able to update
to this version and yet not block our contributors from building jQuery
on older Node.js (at least until it's supported by upstream) this commit
makes ESLint skipped on older Node; a proper message is displayed then.
Attributes: Avoid infinite recursion on non-lowercase attribute getters
Attribute hooks are determined for the lowercase versions of attribute names
but this has not been reflected in the bool attribute hooks. The code that
temporarily removed a handler to avoid an infinite loop was removing an
incorrect handler causing stack overflow.
One test in the attribute module was overwriting jQuery.expr.attrHandle.checked
and wasn't restoring the original state after it finished. It started causing
issues for another checked-related test.
Dave Methvin [Wed, 11 May 2016 01:50:00 +0000 (21:50 -0400)]
Deferred: Give better stack diagnostics on exceptions
Ref gh-2736
The exception stack has the name of the immediately outer function where the
exception occurred, which can be very handy for tracing errors. Since we already
have the exception object we might as well use it.
Jason Bedard [Fri, 1 Nov 2013 05:36:38 +0000 (22:36 -0700)]
Event: Remove fixHooks, propHooks; switch to ES5 getter with addProp
Fixes gh-3103
Fixes gh-1746
Closes gh-2860
- Removes the copy loop in jQuery.event.fix
- Avoids accessing properties such as client/offset/page/screen X/Y
which may cause style recalc or layouts
- Simplifies adding property hooks to event object
Build: Don't lint the built file in the husky precommit hook
The husky Git precommit hook was linting not only the source but also the
built file. Normally it's expected, we want to run basic checks on what's
built but in the precommit hook we're not building the file so we might
be linting some previous, broken version.
CSS: Don't workaround the IE 11 iframe-in-fullscreen sizing issues
IE 11 used to have an issue where if an element inside an iframe was put
in fullscreen mode, the element dimensions started being 100 times too small;
we've added a workaround that would multiply them by 100. However, the IE 11
issue has been unexpectedly fixed and since our detection was really detecting
the browser and not a bug, we've started breaking the browser instead of fixing
it.
Since there's no good way to detect if the bug exists, we have to back the
workaround out completely.
Build: Workaround strict mode violations caused by UglifyJS
This commit increases the gzipped size by 90 bytes so a better solution
is needed but, at the same time, it disables the very optimizations
that are causing strict mode violations in Firefox 45, Safari 9 & IE 10.