Now that we have the token browser in a dialog, it seems unnecessary that we have the automatic scrolling that happens when you click a link in the token browser. I think the original need for the auto-scrolling was caused by the user needing to scroll far down the page to find the correct token. Now that tokens are in the dialog (and typically the dialog overlays the field needing the token, rather than being below it), there is a lot less scrolling involved. To really make the dialog act like a typical dialog, we should also put a max-height on the dialog, so it doesn't end up with a 2000px high dialog after expanding items. If the dialog always fits within the current viewport, no scrolling on the main window will ever be necessary.

CommentFileSizeAuthor
#1 token_remove_autoscroll-2010486.patch341 bytesquicksketch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Status: Active » Needs review
FileSize
341 bytes

Here's a patch that simply removes autoscroll entirely. I personally find the functionality a hindrance even outside of the dialogs, but now that we're using dialogs everywhere, disabling it for dialogs-only is nearly the same as disabling it everywhere. If we'd prefer a patch that only affects dialogs, I can make one that takes that approach.

quicksketch’s picture

I made a separate issue for setting a max height on the dialog: #2019323: Set a max height on the token dialog.

DamienMcKenna’s picture

Chris Matthews’s picture

The 6 year old patch to token.js applied cleanly to the latest token 7.x-1.x-dev and if still applicable needs to be reviewed.