Fix tooltip button/form interaction
This commit is contained in:
parent
1103a7b077
commit
91562e6523
@ -54,7 +54,7 @@ export default function Nav({
|
||||
) =>
|
||||
typeof linkOrAction === 'string'
|
||||
? <Link href={linkOrAction}>{text}</Link>
|
||||
: <button onClick={linkOrAction}>{text}</button>;
|
||||
: <button onClick={linkOrAction} type="button">{text}</button>;
|
||||
|
||||
const switcherSelectionForPath = (): SwitcherSelection | undefined => {
|
||||
if (pathname === PATH_ROOT) {
|
||||
|
||||
@ -41,6 +41,7 @@ export default function ZoomControls({
|
||||
|
||||
const button =
|
||||
<button
|
||||
type="button"
|
||||
className={clsx(
|
||||
'fixed top-[20px] right-[70px]',
|
||||
'size-10 items-center justify-center',
|
||||
|
||||
@ -57,6 +57,7 @@ export default function MoreMenu({
|
||||
>
|
||||
<DropdownMenu.Trigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className={clsx(
|
||||
'px-1 py-[3px]',
|
||||
'min-h-0 border-none shadow-none',
|
||||
|
||||
@ -94,6 +94,7 @@ export default function TooltipPrimitive({
|
||||
{includeButton
|
||||
? <button
|
||||
ref={refTrigger}
|
||||
type="button"
|
||||
onClick={() => {
|
||||
setIsOpen(!isOpen);
|
||||
blurActiveElement();
|
||||
|
||||
@ -159,6 +159,7 @@ export default function InfinitePhotoScroll({
|
||||
const renderMoreButton = () =>
|
||||
<div ref={buttonContainerRef}>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => error ? mutate() : advance()}
|
||||
disabled={isLoading || isValidating}
|
||||
className={clsx(
|
||||
|
||||
@ -23,6 +23,7 @@ export default function PhotoRecipeOverlayButton({
|
||||
<Tooltip content={appText.tooltip.recipeInfo}>
|
||||
<button
|
||||
ref={ref}
|
||||
type="button"
|
||||
onClick={() => {
|
||||
toggleRecipeOverlay?.();
|
||||
// Avoid unexpected tooltip trigger
|
||||
|
||||
Loading…
Reference in New Issue
Block a user