Comments (21)
That appears to have worked! Thank you!
from ngx-drag-to-select.
Thank you for the quick reply and investigation by the way, I can't believe you answered so quickly! :)
from ngx-drag-to-select.
Hey @toddhd, this is actually the expected behavior. The shift key is basically a "temporary add" so the items you select when holding down shift will only be selected when you release the mouse button. The same goes for Shift + CTRL for temporarily removing items. Same here, the items are only removed when you release the mouse button.
But, I am figuring that even when the mouse button is released the items are not selected. There is something off. Maybe I have broken something with the last fix or deployment. Does that work for you?
from ngx-drag-to-select.
So I have tested this on Mac as well, and there it seems to work... I am investigating what the differences are.
from ngx-drag-to-select.
What I expected was one of two situations. Either onSelect() would fire each time you lift your finger off the mouse button (as you described) or that it would fire once you released the SHIFT key (which is what I expected, as that would indicate that all of your selections are done). Either would work for my needs.
I am creating a schedule component that allows the user to drag across a "calendar" of sorts. Unfortunately, it does not work for me as I have no idea what is selected unless the event passes me the items. (For some reason, my "selectedItems" never seems to actually contain my selected items as it should, so I've been grabbing the selected items by hand from onSelect() and processing them from there.
from ngx-drag-to-select.
Hehe, I am definitely dedicated to fix incoming issues. And this seems to be a big one... I am wondering why this works on Mac but not on a Windows. Which OS are you using? It also doesn't seem to be related to the browser, cause Firefox on Mac works as expected... super strange.
from ngx-drag-to-select.
I am working on Windows 10 Pro 64bit. Chrome is my main browser but I am testing in FireFox at the moment. Everything (OS, browsers) is up to date. Appreciate the help.
from ngx-drag-to-select.
Ok, good to know. Very interesting. This is really hard to reproduce and to verify for me on a Mac. Cause it works as expected... I also have a Windows but that's not my dev machine. There it's broken.
from ngx-drag-to-select.
This is how it works on Mac, and this is also how it's supposed to be working.
Still trying to figure out how I can reproduce this on my dev machine...
from ngx-drag-to-select.
Do you happen to have Firefox or Chrome on OSX? Does it work in those browsers in OSX?
What are you using for the selection capability? Are you using Angular's built-in select, or custom code? Maybe the problem is in their logic, if it is a third-party selection routine...
from ngx-drag-to-select.
So I am mainly using Chrome but I have also tested the app (latest version) in Firefox and Safari. All browsers seem to work on my machine.
Everything is basically custom code for selecting those items 🤔
from ngx-drag-to-select.
Very strange. You would think that FF and Chrome would work basically the same regardless of OS on a PC. Maybe it's a keyup/keydown issue?
from ngx-drag-to-select.
Yea I would assume that the browsers work the same regardless of the OS. So it must be something regarding the OS I assume...
from ngx-drag-to-select.
So if you roll back to 2.1.0
it should work again but there are a couple of bug fixes missing and also some minor features. But maybe that works for you in the meantime.
Can you verify that this version works for you?
Also, if it worked in 2.1.0
there must be something that broke the functionality on Windows. Tricky to debug now haha.
from ngx-drag-to-select.
Thank you, I'll give that shot.
from ngx-drag-to-select.
That seems to be working for now, just a quick smoke test. (Of course, like a dumb-ass, I had modified the CSS and forgot, and blew it away when I rolled back). I'll let you know when I get it put back together.
If I get a chance later, I'll see if I can get the source code and take a look on my machine. I'm not sure if you have a custom environment setup, but it's worth a shot.
Thanks again for the support!
from ngx-drag-to-select.
No not really a custom setup. You can just clone the repo and install the dependencies. I am doing the same as we speak on my Windows machine to see what's going on. I'll keep you posted.
from ngx-drag-to-select.
BTW thank you very much for opening this issue. This is really a blocker as it doesn't work properly on Windows anymore.
from ngx-drag-to-select.
So, I dug into this issue and I was able to pin point this to the keyboard events that apparently behave differently on Windows / Mac. This means that when you press a key and hold it pressed on Mac, the event is fired only once. On Windows this causes the event to be fired repeatedly. This was a problem because for every keyboard event, the temporary list of items (built up in any of the extended selection modes) is cleared. This was causing the items from not being deselected once you start pressing any key, cause there are basically no items to be deselected in the cache... it was already cleared but not flushed.
With the fix that I just pushed, keyboard events should behave consistently and the issue should be fixed. I have also released v3.0.3
on npm which should be now available.
So for now, I am closing this issue because I can no longer reproduce the issue on any platform.
I would appreciate it if you could verify that the fix works on your end too.
Happy testing!
from ngx-drag-to-select.
Uhm ok, Travis is not happy and cannot deploy the new version. I am on it!
from ngx-drag-to-select.
Ok, v3.0.3
is now available on npm. Give it a try!
from ngx-drag-to-select.
Related Issues (20)
- Selection is not working when combined with virtual scrolling HOT 3
- Property dragOverItems is not released? HOT 1
- [Question] Trigger drag selection based on pressed key HOT 2
- [Dependencies] Replace node-sass by dart-sass HOT 1
- Selection lost on update if dtsSelectItem is assigned a value HOT 1
- Select box does not update when scrolling, until mouse is moved HOT 2
- [selectOnClick]="false" option prevents initiating a drag box between items HOT 5
- Angular 13 doesn't work with version 5 HOT 4
- How to select specific tiles by default? HOT 3
- Once user reset selection after selecting the cell then he is not able to select same cell again with selecting any other cell or without refreshing the page HOT 1
- In container-grid, selected cell data is not getting updated if there are 2 different grids but sharing single method to update HOT 1
- Button inside selected element not working HOT 3
- Second drag selection when ctrl key is pressed, keeping the First selection
- SelectItemDirective.value unexpectedly returns this instead of dtsSelectItem when dtsSelectItem is falsy HOT 2
- Mobile support like for desktop HOT 1
- When dts container is destroyed, items are unselected HOT 2
- Cannot disable ctrl and shift keys to prevent select? HOT 5
- Dragging inside a dialog is not working correctly HOT 5
- Setting value for [selectedItems] automatically triggers (select) event
- Make parts of vega embed selectable with querry selector?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-drag-to-select.