Skip to main content

Search and Top Navigation

#10144 closed bug (fixed)

Opened July 08, 2014 06:25PM UTC

Closed July 29, 2014 05:20PM UTC

Last modified July 29, 2014 05:20PM UTC

Selectmenu: Losing selection when accesing menu

Reported by: spjonez Owned by:
Priority: minor Milestone: 1.11.1
Component: ui.selectmenu Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:
Description

Fiddle: http://jsfiddle.net/TdLvC/

In the original plugin clicking the menu did not clear any text selection in the browser. Maintaining the selection is necessary if you want to use the dropdown to apply actions to a selection in a contenteditable div.

Attachments (0)
Change History (6)

Changed July 10, 2014 01:01PM UTC by tj.vantoll comment:1

summary: Losing selection when accesing menuSelectmenu: Losing selection when accesing menu

This seems like a reasonable use case to me, as native controls don't do this. fnagel, any idea what's causing this?

Changed July 11, 2014 09:02AM UTC by fnagel comment:2

I've played around with this and was not able to identify why the selection is lost. It's working in my old fork version but I have no clue why as this was never tested or intended.

Here's a (working) demo of this using my old fork: http://jsfiddle.net/GXtpC/1218/

Any experience with this for button widget?

Changed July 11, 2014 12:16PM UTC by spjonez comment:3

Replying to [comment:2 fnagel]:

I've played around with this and was not able to identify why the selection is lost. It's working in my old fork version but I have no clue why as this was never tested or intended. Here's a (working) demo of this using my old fork: http://jsfiddle.net/GXtpC/1218/ Any experience with this for button widget?

I haven't been able to find it either. Commented almost the entire selectmenu code out, added preventDefault and stopPropagation everywhere I could, seems like the base click is coming from menu/widget? Whatever binding applies ui-state-focus on the button itself is allowing the click to go through.

Changed July 29, 2014 01:51PM UTC by scottgonzalez comment:4

Changed July 29, 2014 05:20PM UTC by Scott González comment:5

resolution: → fixed
status: openclosed

Selectmenu: Preserve text selection when interacting with the widget

Fixes #10144

Closes gh-1295

Changeset: 749a6a56677fe29d2bf777d79811ce8bdd1b5fad

Changed July 29, 2014 05:20PM UTC by scottgonzalez comment:6

milestone: none1.11.1