Skip to content

Conversation

@chadwickmeyer
Copy link

This is a joint merge that includes:

  • Prevent page from scrolling when you click the delete button on a bit tag.
  • Add ability to specify a pseduo placeholder on the "input" area, which disappears when you click in the field or when there are bit tags present.

If you want your "input" area to have placeholder text, like a normal input text field allows, this allows for that. When the area is clicked or if there are bit tags, the placeholder is hidden, like a normal placeholder.

NOTE: this is different from the placeholder for the autocomplete, which is a useful, but different feature.
…ceholder

Suggested Ability to have PlaceHolder
This is a joint merge that includes:

- Prevent page from scrolling when you click the delete button on a bit tag.
- Add ability to specify a pseduo placeholder on the "input" area, which disappears when you click in the field or when there are bit tags present.
They left, right, delete, and backspace keys were not working when used with Mootools 1.4.5. This upgrades the code to work with the changes to mootools. There may be a better way to do it, but it appeared that the old method for calling the code value for a specific key just didn't work anymore, e.g. `Event.Keys.left` didn't produce the right event.code, so I switched it to event.key and hard coded the values.
The old method used `Event.keys.up` to determine the correct `ev.code` for the key. But that doesn't work anymore evidently. So this fix hard codes the key name, and compares it with `ev.key` instead.

NOTE: this may not be the most compatible method, but it was the quickest fix for my purposes and hopefully it will help someone else.
Remove the breaks in the switching case statement when checking the correct keys. Evidently only the 'previous' key should have a break for some reason.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant