devote / HTML5-History-API

HTML5 History API expansion for browsers not supporting pushState, replaceState
http://spb-piksel.ru
MIT License
1.02k stars 182 forks source link

Outlook 2010 Web Browser - replaceState function causes loss of focus #43

Closed rfu3 closed 9 years ago

rfu3 commented 10 years ago

http://stackoverflow.com/questions/20099493/using-outlook-2010-as-a-web-browser-the-history-plugin-causes-loss-of-focus

I have provided a little more detail regarding how I use Microsoft Outlook 2010 as my browser in the question above.

Since I wrote the question I have found my issue to be related to the replaceState function in the plugin.

I have programmed my form so that a javascript / jquery keyup function triggers a live search function on my table (datatable). When the keyup function is triggered I also run a function I created called replaceState() which finds all my form inputs and saves the state of them in the history using your plugins history.replaceState function.

Within the Outlook 2010 browser feature each keypress causes the input field to lose focus. I can click back within the field and enter another character but each time the focus is lost. All the functionality works perfectly within this browser and the history is saved successfully.

If I comment out the history.replaceState line the search works fine and doesn't lose focus (and of course doesn't save the history). It doesn't lose focus in IE10 even though the Outlook 2010 browser appears to use the IE10 agent.

Hope you can help with this as I want to integrate my web application into Microsoft Outlook, like Microsoft CRM does.

Thanks for a great plugin, I've tried a few ways to do this and yours is the only one that worked well for me.

devote commented 9 years ago

Please reopen it or create new issue if you needed. Thanks!