Xon / XenForo-WarningImprovements

A Collection of improvements to XF's warning system
MIT License
1 stars 1 forks source link

Attempt to focus custom warning title when selected #22

Closed jrahmy closed 7 years ago

jrahmy commented 7 years ago

The versions in the XML may need changing pending the merge of the warning action corrections, or I can just push on top of those. Whatever is easiest.

As noted in #20, the input still isn't focused on page load... despite the focus method being called all the same.

Xon commented 7 years ago

It might be that on-page load, there is a bit of the script calling "click" on the custom warning to make it load the defaults for the custom warning.

I'm betting that is conflicting with your timeout.

jrahmy commented 7 years ago

It could be something to do with that, though the timeout actually relies on that being triggered to work (it's in a click event handler). I verified that the timeout is correctly triggered on page load, but it just doesn't focus the input. I don't think it's a FormFill or Disabler event interfering as setting the delay to 5s exhibits the same behavior. The exact same timeout/click handler works fine after page-load.

https://github.com/jrahmy/XenForo-WarningImprovements/blob/5344529e0365e38e03df420c184766e598ad5063/addon-SV_WarningImprovements.xml#L889-L902

Xon commented 7 years ago

@jrahmy so far so good with #23, merged this in to start testing it to see if it helps.