Skip to content

Fix #2: preserve zero custom position values#3

Open
hahacium wants to merge 12 commits into
masterfrom
agent-fix-2-position-zero-values
Open

Fix #2: preserve zero custom position values#3
hahacium wants to merge 12 commits into
masterfrom
agent-fix-2-position-zero-values

Conversation

@hahacium

Copy link
Copy Markdown
Owner

Summary

Fixes #2.

The custom position object logic previously used truthiness checks for top, bottom, left, and right. That caused valid numeric 0 values to be treated as missing and replaced with auto.

Fix

  • Replaced truthiness checks with explicit typeof ... !== 'undefined' checks.
  • Preserves valid falsy values such as 0 while still defaulting omitted properties to auto.

Verification

  • Used systematic debugging to locate the issue in src/jquery.tips.js inside the position() method.
  • Verified the branch diff against master; the final file diff only changes the four position-property checks.
  • Automated test/build/lint could not be run because this repository does not contain a package manifest such as package.json or an available test command.

Risk

Low. The change is limited to custom object-based position handling and preserves the existing fallback behavior for undefined properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom position values of 0 are ignored

1 participant