{"record":{"id":"bf73161f2462bcfd","repo":"Semantic-Org/Semantic-UI","slug":"the-position-you-specified-is-not-a-valid-position","errorCode":null,"errorMessage":"The position you specified is not a valid position","messagePattern":"The position you specified is not a valid position","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/modules/popup.js","lineNumber":1454,"sourceCode":"\n  // transition settings\n  duration       : 200,\n  transition     : 'scale',\n\n  // distance away from activating element in px\n  distanceAway   : 0,\n\n  // number of pixels an element is allowed to be \"offstage\" for a position to be chosen (allows for rounding)\n  jitter         : 2,\n\n  // offset on aligning axis from calculated position\n  offset         : 0,\n\n  // maximum times to look for a position before failing (9 positions total)\n  maxSearchDepth : 15,\n\n  error: {\n    invalidPosition : 'The position you specified is not a valid position',\n    cannotPlace     : 'Popup does not fit within the boundaries of the viewport',\n    method          : 'The method you called is not defined.',\n    noTransition    : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>',\n    notFound        : 'The target or popup you specified does not exist on the page'\n  },\n\n  metadata: {\n    activator : 'activator',\n    content   : 'content',\n    html      : 'html',\n    offset    : 'offset',\n    position  : 'position',\n    title     : 'title',\n    variation : 'variation'\n  },\n\n  className   : {\n    active       : 'active',","sourceCodeStart":1436,"sourceCodeEnd":1472,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/popup.js#L1436-L1472","documentation":"In set.position() the resolved position is fed to a switch (popup.js:818-883) covering the nine valid positions ('top left', 'top center', 'top right', 'left center', 'right center', 'bottom left', 'bottom center', 'bottom right'). If none of the cases match, positioning stays undefined and popup.js:884-886 logs error.invalidPosition with the bad value.","triggerScenarios":"Passing a position string that is not one of the nine supported values: $('.popup').popup({ position: 'middle' }) or .popup('set position', 'topside'); also triggered when settings.position or data-position holds an unsupported value after RTL swapping.","commonSituations":"Typos in the position setting ('top centre' with British spelling, 'top-center' with a dash, 'top middle'); using CSS-y names like 'absolute'/'relative'; data-position attributes copied from another library.","solutions":["Use exactly one of the nine supported positions: 'top left', 'top center', 'top right', 'left center', 'right center', 'bottom left', 'bottom center', 'bottom right'.","Check data-position attributes and settings.position for typos, dashes, or British spellings.","If you need a custom placement, pick the closest valid position and tune with offset/distanceAway/jitter instead of inventing a position name."],"exampleFix":"// before\n$('.btn').popup({ position: 'top centre', content: 'Hi' }); // typo -> [90]\n\n// after\n$('.btn').popup({ position: 'top center', content: 'Hi' });","handlingStrategy":"type-guard","validationCode":"var valid = ['top left','top center','top right','left center','right center','bottom left','bottom center','bottom right'];\nif (valid.indexOf(cfg.position) === -1) throw new Error('Invalid popup position: ' + cfg.position);\n$('.btn').popup(cfg);","typeGuard":"function isValidPosition(p){ return ['top left','top center','top right','left center','right center','bottom left','bottom center','bottom right'].indexOf(p) !== -1; }","tryCatchPattern":null,"preventionTips":["Use only the nine supported position strings.","Watch for dashes, British spellings, or invented names.","Validate data-position attributes in markup."],"tags":["popup","position","configuration","semantic-ui","console-error"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}