Jump to content

New Page auto-fill Title fields issue


fmgujju
 Share

Recommended Posts

Whenever I create new page and then I type few letters in the "Title" field and then my chrome browser gives me list of values as pre-fill selection to auto fill text field data and when I select it then the next field which is "Name" which fill out automatically based on "Title" fields value, only gets value of whatever I typed but not what I have selected after I typed few letters.

Anyone have having same issue?

  • Like 1
Link to comment
Share on other sites

I've seen this happen before, just didn't have the time to see what's causing it then. Now that I did, it seems pretty obvious: JS related to title field only expects keyup, which isn't triggered when you choose a value from autofill list.

Making following change would fix this, though I wouldn't necessarily suggest that you make this change locally -- it would make it slightly more difficult to update ProcessWire later. Posting it here just to point out what the problem is/was.

--- a/wire/modules/Inputfield/InputfieldPageTitle/InputfieldPageTitle.js
+++ b/wire/modules/Inputfield/InputfieldPageTitle/InputfieldPageTitle.js
@@ -25,7 +25,7 @@ $(document).ready(function() {
                $nameField.val(val).trigger('blur');
        }

-       $titleField.keyup(titleKeyup);
+       $titleField.bind('keyup change', titleKeyup);

        $nameField.focus(function() {
                // if they happen to change the name field on their own, then disable

I've also just opened an issue for this at GitHub, let's see what Ryan says :)

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...