# If the user completely erases a sticky field, that should automatically unstickify it

**URL:** <https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177>\
**Category:** Suggestions\
**Created:** [December 9, 2023, 12:53am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177 "2023-12-09T00:53:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sprvlcn](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sprvlcn](https://forums.ankiweb.net/u/sprvlcn)\
**Post date:** [December 9, 2023, 12:53am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/1 "2023-12-09T00:53:27Z")

</div>

There are some cases where users accidentally turn on the “sticky field” icon, perhaps with a stray mouse click, and then are mystified and frustrated that the text in the field persists. Two recent examples are shown in the links at the bottom of this post.

Perhaps there is a simple solution.

If you intentionally stickify a field, that means you want to either keep its existing text or at most only edit it a bit. So if instead you completely erase the field and reset it to blank, that means the stickiness was a hindrance rather than a help to you. It caused you to take extra effort to achieve a result (a completely blank field) that you could have gotten for free by default. So if a user completely clears a sticky field, that strongly indicates that they probably did not want the stickiness in the first place.

So I suggest that if a sticky field is completely erased by the user, that should automatically unstickify it.

This will rescue the naive accidental sticky-icon clickers, and should not inconvenience users who intentionally use sticky fields, because this new behavior will be consistent with their intent. Indeed, they will now be able to unstickify a field without a mouse click, using only the keyboard (using Tab and Shift-Tab to move between fields).

Examples of hapless “stuck” users:

> [@Card back/description persists bug](https://forums.ankiweb.net/t/card-back-description-persists-bug/38154):
>
> When I click add a card, the description of the previous card persists. I’m on the latest version on Mac M1 chip and have no add-ons. As you can see in the screenshot, after clicking “Add” the title is gone but the description persists.

> [@Says "show duplicate" and doesn't clear the text](https://forums.ankiweb.net/t/says-show-duplicate-and-doesnt-clear-the-text/37808):
>
> Hey! When I add a card, it adds it to the pack but then it shows “show duplicate” in the red. It also doesn’t clear out the text section, I have to clear it myself to write another card. It used to be so when I add the card, the card is added to the pack and text section is cleared automatically. How do I fix this? Thank you!

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [December 9, 2023, 2:21am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/2 "2023-12-09T02:21:07Z")

</div>

> [@sprvlcn](#):
>
> and should not inconvenience users who intentionally use sticky fields

There’s still a chance of that - if the user want to add 3 notes with “foo”, then 3 notes without anything, then 3 notes with “bar”, the suggested approach would require them to turn the pin back on again after the empty input. The issue you’re trying to solve is a common pain point though, so perhaps it would be worth the trade-off.

---

<div class="post-metadata">

**Author:** ![Aleksej](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@Aleksej](https://forums.ankiweb.net/u/Aleksej)\
**Post date:** [December 9, 2023, 2:24am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/3 "2023-12-09T02:24:17Z")

</div>

Boolean fields only ever filled with “y” or nothing should always stay sticky.

---

<div class="post-metadata">

**Author:** ![jcznk](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/jcznk/32/15215_2.png) [@jcznk](https://forums.ankiweb.net/u/jcznk)\
**Post date:** [December 9, 2023, 3:02am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/4 "2023-12-09T03:02:35Z")

</div>

I can see how this could be useful, but, personally, I would find it quite inconvenient. My note type has many fields that I always want to be sticky, and having to pin them back every time they are emptied would disrupt my workflow.

If changes are to be made, I would appreciate if they were at least introduced as an option (maybe defaulting to yes, if that is the more “new user”-friendly behavior).

For example, something along the lines of:

![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/3/6/36045c83ed98e280f1b3f5fec4dedfd4d934ae9a.png)

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [December 9, 2023, 4:37am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/5 "2023-12-09T04:37:52Z")

</div>

I’d prefer not to add yet another option. With two people voicing how the change would inconvenience them within an hour of my reply, I think it’s probably best we not make this change. Maybe we could make the pin more visually obvious when enabled, instead.

---

<div class="post-metadata">

**Author:** ![sprvlcn](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sprvlcn](https://forums.ankiweb.net/u/sprvlcn)\
**Post date:** [December 21, 2023, 3:36pm UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/6 "2023-12-21T15:36:06Z")

</div>

@Aleksej @jcznk Are there any situations in your normal workflow where you would completely erase the same sticky field twice in a row for creation of consecutive notes? Or three notes in a row?

I think with two or three consecutive erasures the probability of a frustrated user is very high.

---

<div class="post-metadata">

**Author:** ![Aleksej](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@Aleksej](https://forums.ankiweb.net/u/Aleksej)\
**Post date:** [December 21, 2023, 9:12pm UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/7 "2023-12-21T21:12:06Z")

</div>

The first field and the originaltext field of most of my note types is sticky. I create cards from the same phrase in different notes (helps with MorphMan), and cards with different pictures and the same name of a person.

---

<div class="post-metadata">

**Author:** ![sprvlcn](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sprvlcn](https://forums.ankiweb.net/u/sprvlcn)\
**Post date:** [December 21, 2023, 10:00pm UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/8 "2023-12-21T22:00:21Z")

</div>

Okay, but if the original “erasing the field (one time) unstickifies it” proposal would be disruptive to your workflow, how about “erasing twice in a row”?

In other words, when creating multiple notes one after another, would you ever find yourself completely erasing a stickied field again and again when creating two or more new notes in a row? I didn’t get a clear sense of that from your response.

We’d expect a frustrated and floundering user to keep erasing the stickied field over and over and wondering why the sticky text keeps returning. Would two erasures in a row be a high enough threshold to conclude that this is indeed that kind of user and probably not a sophisticated user using the stickied field as intended?

---

<div class="post-metadata">

**Author:** ![Aleksej](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@Aleksej](https://forums.ankiweb.net/u/Aleksej)\
**Post date:** [December 22, 2023, 2:08am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/9 "2023-12-22T02:08:31Z")

</div>

I would prefer the field to be sticky when I open the Add window. If it unsticks when I clear it twice in a row after that, it’s not a problem, but I doubt Damien would add that.

---

<div class="post-metadata">

**Author:** ![Gustaf-C](https://avatars.discourse-cdn.com/v4/letter/g/c68b51/32.png) [@Gustaf-C](https://forums.ankiweb.net/u/Gustaf-C)\
**Post date:** [December 22, 2023, 5:41am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/10 "2023-12-22T05:41:42Z")

</div>

> [@dae](#):
>
> Maybe we could make the pin more visually obvious when enabled, instead.

I suggest doing the same thing as the editor buttons, I think that would solve most of the issue.

![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/a/e/ae483c30c6933754dc2feab9685de4393a263f3a.png)

---

<div class="post-metadata">

**Author:** ![jcznk](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/jcznk/32/15215_2.png) [@jcznk](https://forums.ankiweb.net/u/jcznk)\
**Post date:** [December 23, 2023, 12:51pm UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/11 "2023-12-23T12:51:52Z")

</div>

Yeah, I guess there are such situations, maybe even quite often. Since I usually keep the ‘Add’ window open in the background without ever really closing it, and I tend to use the same note type for all my cards, I do often end up adding multiple unrelated notes consecutively.

However, personally, this still does not make me feel the need to unstickify the fields. I prefer having to delete the content of the fields rather than going back to the Browser to fetch some text/media from the previous note, and/or having to remember to re-stickify a field before adding the note. Overall, I find it requires less mental effort.

This add-on also helps make clearing unwanted field content much less tedious: [Clear all fields - AnkiWeb](https://ankiweb.net/shared/info/261351307).

---

<div class="post-metadata">

**Author:** ![sprvlcn](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sprvlcn](https://forums.ankiweb.net/u/sprvlcn)\
**Post date:** [December 23, 2023, 10:02pm UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/12 "2023-12-23T22:02:54Z")

</div>

> [@jcznk](#):
>
> I prefer having to delete the content of the fields rather than going back to the Browser to fetch some text/media from the previous note, and/or having to remember to re-stickify a field before adding the note. Overall, I find it requires less mental effort.

Hmm, what if it was two-pronged?

- Completely erasing a stickied field twice unstickifies it,  
and
- Stickifying an empty field automatically brings back the contents from the previously saved note.

That would eliminate the problems mentioned in the message text I quoted above.

Maybe some experimental add-on could eventually try to implement some of the above notions.

* * *

But yeah, perhaps highlighting the sticky pin is a simpler approach.

Some vague thoughts:

- Moving the pin icon to the left-hand side instead of the right-hand side? That’s where users are looking when they’re entering text.
- Making the icon look a bit more like the tilted emoji pushpin character? ( [📌 Pushpin Emoji](https://emojipedia.org/pushpin) ) The current version is perhaps bafflingly nondescript.
- Making the icon itself inactive and putting a Qt checkbox next to it, which would do the actual function of turning stickiness on or off?
- Having the checkbox floodfill with a pale off-white background color when turned on, which could perhaps even be echoed by having the stickied text field itself switch to that pale background color, as a visual cue of a different mode being in effect.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [December 24, 2023, 6:59am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/13 "2023-12-24T06:59:49Z")

</div>

> [@sprvlcn](#):
>
> Hmm, what if it was two-pronged?

I’m sorry, it just feels too complicated.

> [@sprvlcn](#):
>
> Moving the pin icon to the left-hand side instead of the right-hand side? That’s where users are looking when they’re entering text.

That would mean the icons move depending on the length of the field name, which can look a bit untidy. I think the suggestion of using a color highlight may be the best - it would be easier to see out of the corner of one’s eye, if the user has the add screen maximized and is focusing on the left.

> [@sprvlcn](#):
>
> Making the icon look a bit more like the tilted emoji pushpin character?

Adding color would be too distracting I think, but if someone with graphic skills can propose a tilted pin icon that better matches Anki’s current UI, I’d be happy to consider it.

> [@sprvlcn](#):
>
> Making the icon itself inactive and putting a Qt checkbox next to it, which would do the actual function of turning stickiness on or off?

Checkboxes increase visual noise, and would be inconsistent with the HTML editor toggle.

---

<div class="post-metadata">

**Author:** ![sprvlcn](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sprvlcn](https://forums.ankiweb.net/u/sprvlcn)\
**Post date:** [December 26, 2023, 8:48am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/14 "2023-12-26T08:48:18Z")

</div>

> [@dae](#):
>
> if someone with graphic skills can propose a tilted pin icon that better matches Anki’s current UI, I’d be happy to consider it

I have no graphic skills at all, but I found [this pushpin SVG](https://www.svgrepo.com/svg/4879/push-pin) with a quasi-public-domain [Creative Commons CC0 license](https://creativecommons.org/public-domain/cc0/), and just resized it to 11x11 (the current vertical pushpin icon is 8x11).

Here is the original hollow version and a filled-in version.

![Screenshot 2023-12-26 031712](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/f/d/fd85042e9b39a0909d79b123ac2f2af37d2b5915.png)  
 ![Screenshot 2023-12-26 031931](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/e/e/ee23a6867fc1a41699902bbacebf9b42b7e444ab.png)

What do you think? They seem sort of OK to me. Anyways it was minimal effort on my part, so I don’t mind if it’s rejected. The source code (modified from the original) is below:

The hollow version:

```auto
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Adapted from https://www.svgrepo.com/svg/4879/push-pin License: CC0 -->
<svg fill="#a0a0a0" height="11px" width="11px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
         viewBox="0 0 490.125 490.125" xml:space="preserve">
                        <path d="M300.625,5.025c-6.7-6.7-17.6-6.7-24.3,0l-72.6,72.6c-6.7,6.7-6.7,17.6,0,24.3l16.3,16.3l-40.3,40.3l-63.5-7
                                c-3-0.3-6-0.5-8.9-0.5c-21.7,0-42.2,8.5-57.5,23.8l-20.8,20.8c-6.7,6.7-6.7,17.6,0,24.3l108.5,108.5l-132.4,132.4
                                c-6.7,6.7-6.7,17.6,0,24.3c3.3,3.3,7.7,5,12.1,5s8.8-1.7,12.1-5l132.5-132.5l108.5,108.5c3.3,3.3,7.7,5,12.1,5s8.8-1.7,12.1-5
                                l20.8-20.8c17.6-17.6,26.1-41.8,23.3-66.4l-7-63.5l40.3-40.3l16.2,16.2c6.7,6.7,17.6,6.7,24.3,0l72.6-72.6c3.2-3.2,5-7.6,5-12.1
                                s-1.8-8.9-5-12.1L300.625,5.025z M400.425,250.025l-16.2-16.3c-6.4-6.4-17.8-6.4-24.3,0l-58.2,58.3c-3.7,3.7-5.5,8.8-4.9,14
                                l7.9,71.6c1.6,14.3-3.3,28.3-13.5,38.4l-8.7,8.7l-217.1-217.1l8.7-8.6c10.1-10.1,24.2-15,38.4-13.5l71.7,7.9
                                c5.2,0.6,10.3-1.2,14-4.9l58.2-58.2c6.7-6.7,6.7-17.6,0-24.3l-16.3-16.3l48.3-48.3l160.3,160.3L400.425,250.025z"/>
</svg>

```

And the solid version:

```auto
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Adapted from https://www.svgrepo.com/svg/4879/push-pin License: CC0 -->
<svg fill="#000000" height="11px" width="11px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
         viewBox="0 0 490.125 490.125" xml:space="preserve">
                        <path d="M300.625,5.025c-6.7-6.7-17.6-6.7-24.3,0l-72.6,72.6c-6.7,6.7-6.7,17.6,0,24.3l16.3,16.3l-40.3,40.3l-63.5-7
                                c-3-0.3-6-0.5-8.9-0.5c-21.7,0-42.2,8.5-57.5,23.8l-20.8,20.8c-6.7,6.7-6.7,17.6,0,24.3l108.5,108.5l-132.4,132.4
                                c-6.7,6.7-6.7,17.6,0,24.3c3.3,3.3,7.7,5,12.1,5s8.8-1.7,12.1-5l132.5-132.5l108.5,108.5c3.3,3.3,7.7,5,12.1,5s8.8-1.7,12.1-5
                                l20.8-20.8c17.6-17.6,26.1-41.8,23.3-66.4l-7-63.5l40.3-40.3l16.2,16.2c6.7,6.7,17.6,6.7,24.3,0l72.6-72.6c3.2-3.2,5-7.6,5-12.1
                                s-1.8-8.9-5-12.1L300.625,5.025z"/>
</svg>

```

---

<div class="post-metadata">

**Author:** ![sprvlcn](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sprvlcn](https://forums.ankiweb.net/u/sprvlcn)\
**Post date:** [December 26, 2023, 9:01am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/15 "2023-12-26T09:01:02Z")

</div>

One more thing occurred to me just now:

The pushpin is positioned right next to the scrollbar. That might be a reason why some people activate it accidentally with a slip of the mouse. Perhaps the \<&nbsp;\> icon and the pushpin could trade places?

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [December 27, 2023, 3:56am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/16 "2023-12-27T03:56:53Z")

</div>

I’d need to see it _in situ_ to know for sure, but in principle I have no objections to using that icon and switching the order (the latter may interrupt some people’s muscle memory which is unfortunate, but this is a common issue that would be nice to address). Anyone feel like working up a PR?

---

<div class="post-metadata">

**Author:** ![Anon\_0000](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Anon\_0000](https://forums.ankiweb.net/u/Anon_0000)\
**Post date:** [January 30, 2025, 5:28pm UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/18 "2025-01-30T17:28:34Z")

</div>

Has someone already done a PR for you to look at?

I do see `pin-angle.svg` and `pin-angle-fill.svg` in `out/node_modules/bootstrap-icons/icons` but couldn’t find a PR where this was further discussed.

If this is still relevant, I could work on a PR for this.

I’d need a pointer though regarding in which file the [code above](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/14) should be changed.

---

<div class="post-metadata">

**Author:** ![llama](https://avatars.discourse-cdn.com/v4/letter/l/8baadc/32.png) [@llama](https://forums.ankiweb.net/u/llama)\
**Post date:** [January 30, 2025, 6:14pm UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/19 "2025-01-30T18:14:52Z")

</div>

> [@Anon\_0000](#):
>
> I’d need a pointer though regarding in which file the [code above](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/14) should be changed.

From a cursory glance, both [StickyBadge.svelte](https://github.com/ankitects/anki/blob/fab939e0e18d0bf7667c5ff86ff61c8960067f57/ts/editor/StickyBadge.svelte) and [icons.ts](https://github.com/ankitects/anki/blob/fab939e0e18d0bf7667c5ff86ff61c8960067f57/ts/lib/components/icons.ts) need to be modified at least

Switching the order will probably require changing NoteEditor.svelte

---

<div class="post-metadata">

**Author:** ![Anon\_0000](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Anon\_0000](https://forums.ankiweb.net/u/Anon_0000)\
**Post date:** [January 30, 2025, 8:16pm UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/20 "2025-01-30T20:16:31Z")

</div>

> [@llama](#):
>
> From a cursory glance, both [StickyBadge.svelte](https://github.com/ankitects/anki/blob/fab939e0e18d0bf7667c5ff86ff61c8960067f57/ts/editor/StickyBadge.svelte) and [icons.ts](https://github.com/ankitects/anki/blob/fab939e0e18d0bf7667c5ff86ff61c8960067f57/ts/lib/components/icons.ts) need to be modified at least

Does that mean I do not have to edit the xml code somewhere in the codebase, as the angled pins already exist? So I’d basically just have to change the references to the angled pins instead the current non-angled pins?

I tried a regex text search over the project tree but couldn’t find where the xml file would go. Maybe the current `pin-angle.svg` was a first steps towards this suggestion here though.

**Edit:** I think I misunderstood the xml code thingy. I thought it was modified anki code. I didn’t know that svg files basically are xml code logic. I’ll open a PR then somewhat soon in the closer future.

**Edit 2** : Where does the `out/node_modules/bootstrap-icons/icons/pin-angle.svg` originate from, though? At least with githubs file search I cannot find it in master.

---

<div class="post-metadata">

**Author:** ![sprvlcn](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sprvlcn](https://forums.ankiweb.net/u/sprvlcn)\
**Post date:** [January 31, 2025, 4:32am UTC](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177/21 "2025-01-31T04:32:15Z")

</div>

> Has someone already done a PR for you to look at?

In the end I did not pursue this, so you are welcome to give it a try.

[Next page](https://forums.ankiweb.net/t/if-the-user-completely-erases-a-sticky-field-that-should-automatically-unstickify-it/38177.md?page=2)
