-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggling taskitems does not work with a password manager installed #2697
Comments
Thanks for your bug report @pkkid. I wasn't able to reproduce the issue. I tested in the latest versions of:
could you specify more information? Which browser or was any devtool extension used while testing it? |
@pkkid Check your browser extensions. I use Enpass password manager, and I believe I noticed the same issue. Disabling the extension solved it for me. |
This is in fact the case. I have Bitwarden installed on Google Chrome. If I disable the extension the TaskItems work as expected. I updated this issue title to better reflect the problem. It's unfortunate that TaskItems will not work if a password manager is installed. I imagine this is not a small subset of internet users. This issue is a weird one because on one hand you want to say this is a Bitwarden and Enpass bug that they need to fix on their end. The chances they can or will fix that issue is probably pretty minimal. On the other hand, one may also argue that putting inputs on the page not wrapped in a form is in fact a bug. While not ideal, it would be nice if there was a workaround in TipTap to get this working. Searching online I found another project hitting a similar issue, and their workaround seems to be using fake input elements. Is an approach along these lines something TipTap may consider? ..or maybe an option on the extension to use fake inputs? outline/outline#2921 |
I don't know much about the root cause of this issue, but I don't think this happens with all password manager extensions out there.
I'm of the opinion that this should be fixed by them, I even opened an issue about it for Enpass here (I'm actually in the process of migrating to Bitwarden, and it sucks to see that it has the same problem). A browser extensions should never break a website like this. Maybe you could open a similar issue for Bitwarden (minus the ranting 😅)? |
In an ideal world yes, but I imagine this is a huge uphill battle. Now we have at least two password managers reporting these symptoms, as well as several bugs previously reported. I'm sure there are other password managers with similar issues not yet reported. I am not a maintainer in this package, so my opinion shouldn't carry much weight. However, I imagine if there is pretty simple workaround, and it solves a problem for many users, why not incorporate it as an option? |
The question coming from this is - if browser extensions are breaking a library, is it the libraries responsibility to handle extensions fiddling with the libraries functionality? If you take a look into the source code: There is not a lot of magic happening here. If for example the password manager extension is adding custom nodes to input elements (for example input[type="checkbox"] that could lead to problems with prosemirror and it's I guess it's really on the extension developers side to ignore input fields that are inside |
Here is a proof of concept that works without using an input element. I'm happy using a modified extension while other people fight to get the password manager apps to fix their bug. Surprisingly the code is simpler as it can use the li state as the source of truth rather than syncing the input state and li state. It however does require the developer style the span to look like an input on their own. - https://codesandbox.io/s/tiptap-task-items-qm797u?file=/src/task-item.cjs.js |
I'd be against using a hacky non-input solution. Not only because you have to do custom styling for the span but also of the semantics. I digged a bit into the Enpass javascript code and could see that on change they modify the input element by adding a data attribute to the element. Since Bitwarden is doing something similar (as seen as here: bitwarden/clients#725) I suspect that's the culprit. |
Understandable. We understand the problem is upstream, as well as have a workaround. I thought there may be a chance that having task-list wrap the list in a Maybe this bug should be closed as UPSTREAM WONTFIX at this point? |
@bdbch @pkkid Bitwarden is clearing the underlying cause of this issue, however I can't see any difference in the TaskItem dom elements whether Bitwarden is enabled or not, doing a Browser Refresh of course. Best I can work out is that the I appreciate that various Browser Extensions are causing this. It would appear the developers of these extensions are unlikely or possibly unable to resolve the issues affecting TiptTap. I wonder therefore if the TaskItem Extension can take into account what's going on and handle this issue for us. My gut feeling is a fix lies somewhere in FYI I reported the same issue here Also see this issue Unfortunately as is the TaskItem Extension is unusable. |
@clibu I moved forward using my own implementation that removes the input elements. It works fine for my own needs, but requires you style it yourself (like everything else in tiptap). I guess that's frowned upon by the thumbs downs above, but it works.. which is better than the default implementation. |
@pkkid Thanks I saw your earlier Codesandbox example which I assume is the same. I may end up using that. I had used this in an earlier non-Tiptap implementation which also doesn't use an I just tried the ToDo list on https://bangle.dev/ and it also fails with Bitwarden running. |
@pkkid @bdbch Ok this is what I've done. Added the following exported
Using |
Thanks @clibu I have a little bit on the pipeline right now but I'll check out your solution as soon as I find some time! |
As far as I can see from your solution is that it's not accessible as you remove tabbing into checkbox elements? I'd say we keep the current implementation - link to your temporary solution and hope that Bitwarden & Enpass are fixing it on their sides. |
@bdbch I'll revisit why I removed tab into checkbox. That said I just tried using Tab in the example at https://tiptap.dev/api/nodes/task-list and Back Tab removes the first checkbox altogether. Further Undo doesn't restore it. This is with Bitwarden disabled. So it is badly broken. From my quick check Tasklist is the only element you can Tab into within TipTap and seems quite pointless to me. |
@pkkid @bdbch @rfgamaral From what I can see Bitwarden has now fixed this issue. I was seeing an issue with my work-around where the checkbox and strikethrough were out of sync which got me to revisit this. Also see: bitwarden/clients#725 I am seeing an issue with the Tiptap code + YJS where changing the taskitem state on the first item in a list changes the strikethrough but not the checkbox on another device. Taskitems after the first work as expected. |
What’s the bug you are facing?
When trying to click a task item on or off, it causes an Index out of range error.
How can we reproduce the bug on our side?
What did you expect to happen?
Expect the TaskItem to toggle on and off.
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: