Git Product home page Git Product logo

softmoonwebware / mastercolorpicker Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 2.01 MB

Advanced JavaScript color picker tool delivers all the color you can handle. ColorBlind Assistant included. Supports unique needs of digital media formats.

Home Page: http://softmoon-webware.com/MasterColorPicker_instructions.php

License: Other

JavaScript 76.23% CSS 7.29% HTML 14.69% PHP 1.79%
oklch blind blindness color color-blind color-palette color-picker color-space colorblind colorpicker

mastercolorpicker's People

Contributors

softmoonwebware avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

meodai

mastercolorpicker's Issues

problems with the last Picker class update

The Picker class was originally developed to work with MSIE6, and the fact that, back then, event-handlers would be executed in a random order (when an event occurred) instead of in the order they were registered/attached. Also, the book that taught me JavaScript: "JavaScript - The Definitive Guide" (5th Edition, 1996, by David Flanagan) failed to mention that IE has proprietary "focusin" and "focusout" event types (that bubble, as opposed to "focus" and "blur" events that do not bubble).
In the Picker class, "interface elements" (form elements that are themselves part of the Picker-implementation interface) need to have event-handlers that catch when the user leaves focus of these elements. A complicated "dance" of events happens. The original Picker class used "focus" and "blur" event handlers attached to each and every one of these "interface elements". this worked fine, until the MyPalette interface started building long lists of these "inputs", and that was adding significant overhead behind-the-scenes (which probably would be no problem with today's modern computers), but also was causing a (longer) delay in loading a palette-file into the MyPalette interface.
The new Picker 2.0 class uses "focusin" and "focusout" handlers that are attached to the MyPalette panel and catch all bubbling events from "interface elements" on the panel, instead of multiple individual handlers on each one. No other real changes were made.
Since then, the Picker class randomly (so it seems) fails to work correctly, and without having done extensive testing, I can only assume that event-handlers are not executing in the same order each time. While "tabbing" (using the TAB key) through each interface element on a Picker-panel, occasionally control is passed back to the "color-input" (the Picker data-target that receives the color-text when you choose a color using MasterColorPicker) instead of the next interface element on the panel. A few times, I've seen keyboard focus completely lost, yet the MasterColorPicker fails to "pop-down" (disappear) as it should when not in use.
You will not notice this "pop-down" problem using the desktop-tools (since they never pop-down), but it shows up in the online demo, where the MasterColorPicker project is included in the instructions page. (http://softmoon-webware.com/MasterColorPicker_instructions.php)
Debugging the event-dance requires using the "Log.js" class to auto-group an action's events based on when they happen, or the browser console loads up with a crazy list of event-logs and it became nearly impossible to know when one "action" ends and another starts.
For instance, if you have focus in an "interface element" and press the TAB key (an action), you get the following events (at least) keydown, blur, focus. Clicking anywhere (an action) creates another flurry of events under these circumstances. The keydown handler should recognize a Tab key and inform the following "blur" event that control is being transferred to another interface element, and not to do anything. This is not happening.
At this time, I need to get involved in other projects, and will not be able to address this issue until an unknown future time.

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.