Code Monkey home page Code Monkey logo

Comments (9)

offsky avatar offsky commented on June 8, 2024

Everything seems to be working correctly except for tab and click on the multi-picker. Single picker works great.

from ade.

offsky avatar offsky commented on June 8, 2024

Still a few issues with the multi-list picker.

  1. The delete key should remove the last item in the list. This works when using the select2 wrapper in edit-mode (at the top of the page), but doesn't work when converted from the read-version.

  2. The esc is saving and closing the multi-picker instead of canceling the edit and closing the picker. Try opening the picker, add an item to the list and then press esc. It should revert the change

  3. When you type into the multi-picker and it matches one of the values and you press tab or return to select it, it does, but then what you had partially typed is still there. Try typing "app" and then tab. It should select "apple", but then "app" will still be there which means that you have to press the delete key 3 times to enter a new value. It should clear the typed text when selecting a value from the list

  4. Clicking the X to remove a selected value is causing the popup to save and go away. It would be better if it stayed so that you could remove more values or add a new one.

from ade.

annavester avatar annavester commented on June 8, 2024

Jake, all of the above should be corrected.

I had to do some changes in the select2.js as some of the event handling was impossible (I think) to implement otherwise. I made notes and labeled each change within the file.

I also had to comment out the top controls because they were interfering with the body click handling. Please look over the changes and see if those will work for you.

Thanks!

from ade.

offsky avatar offsky commented on June 8, 2024

Its getting better. Two things:

  1. In multi-line picker, it would be better if the tab/return key only selected a value if you had typed some part of it. Right now, pressing tab/return will select the top item in the list. If you click on the multi-picker and then immediately press tab/return, it should return to read more without selecting anything.

  2. I would like the top controls to still work. Perhaps we should get rid of the body click handling in a similar way that we did with the url directive?

from ade.

annavester avatar annavester commented on June 8, 2024

In regards to item 2, that body click is within the select2, (I plugged our detection code in there - https://github.com/Toodledo/ADE/blob/master/app/vendor/js/select2.js#L523 ). I will need to see if I can somehow distinguish between our modified controls and top "out-of-the-box" controls.

from ade.

offsky avatar offsky commented on June 8, 2024

Yes, it sounds like we'll have to do that.

from ade.

annavester avatar annavester commented on June 8, 2024

In regards to item 1, it looks like the way it works now is a standard multipicker behavior - http://ivaynberg.github.com/select2/#multi Do you still want me to try customizing it?

from ade.

annavester avatar annavester commented on June 8, 2024

Jake, I believe that body click should be working properly now. Please see my note about item 1 above. Thanks!

from ade.

offsky avatar offsky commented on June 8, 2024

Lets leave it here for now. Thanks

from ade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.