Results 1 to 2 of 2

Thread: Tag component glitches - how to prevent some default behavior?

  1. #1
    Sencha Premium User
    Join Date
    Jul 2017
    Posts
    15
    Answers
    1

    Default Tag component glitches - how to prevent some default behavior?

    Hi,

    I want to use Tag component (tagfield, Ext.form.field.Tag) in my layout (only Classic). It has fixed width and is not longer than 250 pixels and cannot grow in height - has only one row of space (such requirement from customer, don't ask me why). I found that in such configuration default behavior is quite annoying.

    Here is the fiddle to check it: https://fiddle.sencha.com/#view/editor&fiddle/231j

    If I click on component, dropdown list is shown and selected items are scrolled up which I want to prevent (this scroll event) - how can I do this? I assume that this scroll happens to show/focus on input for search but I have edit mode disabled (there are only predefined values which can be selected, no keyboard input). It will be nice to prevent scrolling to show/focus this input or even hide input field.

    I tried to pay with fieldSubTpl property but without success. Do anyone has some workaround for these issues? Acceptable solution is to hide input field at all or just prevent scrolling to this field. Any help appreciated.

    Despite such small issues, this framework is awesome and development is pure fun :)

    Regards,
    Maciej

  2. #2
    Sencha Premium User
    Join Date
    Jul 2017
    Posts
    15
    Answers
    1

    Default

    Hi again,

    If anyone interested, I managed to workaround scrolling of dropdown to focus input. In fact, after expanding list I just scroll it to the top by calling setScrollTop(0) on listWrapper, see updated fiddle (https://fiddle.sencha.com/#view/editor&fiddle/231j).

    Cheers,
    Maciej

Similar Threads

  1. Textfield clearicontap prevent default
    By spazzymoto in forum Sencha Touch 2.x: Q&A
    Replies: 3
    Last Post: 5 Nov 2014, 2:47 AM
  2. Prevent Message box button from having focus by default
    By Hollywood in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 16 Feb 2010, 4:54 AM
  3. Prevent item selection/hover behavior on disabled DataView
    By meej in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 31 Jul 2008, 10:53 AM
  4. are there other ways to prevent default actions?
    By iamakimmer in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 7 Mar 2007, 4:46 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •