问题标签 [page-jump]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
86 浏览

ios - SwiftUI IPhone TextFields spanning greater than screen jumping, standard behaviour?

I have a screen layout where I have 2 text fields with content that pushes then last Textfield out of the screen: Textfield .... TextField

When I enter data, in the top Textfield, and the click on the bottom textfield, the screen jumps back to the top TextField. Even though the focus is now on the bottom textfield. Think this would be 'standard' behaviour or a 'bug'.

As code is straight forward:

Is this standard behaviour?

I would like the focus to change to the field selected not the field data has been entered.

0 投票
1 回答
74 浏览

javascript - 想要反转 JavaScript “回到顶部”按钮以制作匹配的“跳到底部”按钮

我有一个“返回顶部”按钮,它在所有浏览器甚至移动设备上都非常适合我。因为我在基本上是照片库页面上使用它,最新的照片被添加到底部,我想添加一个始终在页面顶部可见的匹配按钮,以便经常访问者可以直接跳到底部。我搜索了 Stack 并发现了许多类似的问题,但因为我对 JavaScript 一无所知,所以我不知道如何将提供的解决方案转换为我的特定现有代码。

这是我的代码:

谢谢你。

0 投票
1 回答
36 浏览

javascript - 我怎样才能使它只加载选项卡区域而不是单击选项卡后跳转到顶部的页面?

正如标题所述,我正在制作一个选项卡式部分,以在单击时切换内容,效果很好,我怎样才能使它在单击新选项卡时可以平滑过渡到内容并防止跳转到顶部每次我点击一个标签页?

我尝试添加阻止链接的功能,但这不是链接,因此似乎不起作用。

HTML

CSS

JavaScript