# HistoryStates always returns 50

**URL:** <https://forums.creativeclouddeveloper.com/t/historystates-always-returns-50/8016>\
**Category:** Photoshop\
**Tags:** bug, uxp\
**Created:** [June 17, 2024, 1:06pm UTC](https://forums.creativeclouddeveloper.com/t/historystates-always-returns-50/8016 "2024-06-17T13:06:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbrowning](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@rbrowning](https://forums.creativeclouddeveloper.com/u/rbrowning)\
**Post date:** [June 17, 2024, 1:06pm UTC](https://forums.creativeclouddeveloper.com/t/historystates-always-returns-50/8016/1 "2024-06-17T13:06:50Z")

</div>

require(‘photoshop’).app.activeDocument.historyStates

Returns 50. I do more actions (mixture of brush strokes, eraser) and I can see the history pane showing these new actions. This code again returns 50.

This is a breaking bug for the work I’m using UXP for. Any advice please?

@kerrishotts @Jarda

---

<div class="post-metadata">

**Author:** ![tomzag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/tomzag/32/2464_2.png) [@tomzag](https://forums.creativeclouddeveloper.com/u/tomzag)\
**Post date:** [June 17, 2024, 2:11pm UTC](https://forums.creativeclouddeveloper.com/t/historystates-always-returns-50/8016/2 "2024-06-17T14:11:02Z")

</div>

Maybe this is tied to this setting?

 ![SCR-20240617-oggs](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/5/528fea41de04ed1ff807820adb8d3b4b33307e74.jpeg)

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [June 17, 2024, 3:05pm UTC](https://forums.creativeclouddeveloper.com/t/historystates-always-returns-50/8016/3 "2024-06-17T15:05:55Z")

</div>

It should return proxy: [https://developer.adobe.com/photoshop/uxp/2022/ps\_reference/classes/historystates/](https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/historystates/)

If you want more history steps, change PS settings.

---

<div class="post-metadata">

**Author:** ![rbrowning](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@rbrowning](https://forums.creativeclouddeveloper.com/u/rbrowning)\
**Post date:** [June 18, 2024, 8:08am UTC](https://forums.creativeclouddeveloper.com/t/historystates-always-returns-50/8016/4 "2024-06-18T08:08:42Z")

</div>

@Jarda @tomzag  
Thank you both. This makes sense. Sadly, it’s a default of 50 I believe. Which means our users would need to change it.

Thanks for your help.
