Note: There are a few cases of duplicates in user autocompletion which are being worked on.

persist should be able to remove an attribute from an element

NEW
Unassigned

Status

()

Core
XUL
P3
normal
18 years ago
3 years ago

People

(Reporter: hangas, Unassigned)

Tracking

(Blocks: 1 bug, {helpwanted})

Trunk
Future
helpwanted
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3-])

(Reporter)

Description

18 years ago
persist should be able to remove an attribute from an element.  Currently persist
saves the value of an attribute to the localstore.rdf file only if there is an
attribute.  We need a way to save the fact that there is no attribute so that
when the document is built the next time it can remove an attribute that is set
by default in the XUL.  We currently use checked="true" on menu items that must
persist, the problem comes in when we remove this attribute to remove the
checkmark, nothing is saved to the localstore.rdf file, so the next time this
window is displayed it does not get the checked="true" removed from the element.

We need to fix globalOverlay.js when this is fixed, to remove the hack of setting
checked="false".

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: M12

Updated

18 years ago
Target Milestone: M12 → M20

Comment 1

18 years ago
I suck.

Updated

17 years ago
Target Milestone: M20 → Future

Comment 2

17 years ago
any chance of this being done in the near future?  it's really annoying when
trying to create checkbox menuitems that use persist to save their values.  The
only workaround is to use the prefs file, which is really cumbersome.  This will
prevent companies attempting to add menus for their employees from using such
menus, which could be a major problem with acceptence.  Recommend fixing before PR3.

Comment 3

17 years ago
nominating nsbeta3, because of above reasons.
Keywords: nsbeta3

Comment 4

17 years ago
This would be a great feature to have, but I'm not going to be able to get to it
before nsbeta3.
Keywords: helpwanted
Whiteboard: [nsbeta3-]
Assignee: waterson → jag
Status: ASSIGNED → NEW
QA Contact: claudius → jrgmorrison

Updated

12 years ago
Blocks: 251273
I no longer see a checked="false" hack in any of the globalOverlay.js files in the repository, but setting autocheck="false" on the menuitem, then manually setting the attribute to "false" when the menuitem is unchecked (i.e. doing menuitem.setAttribute("checked", "false") instead of menuitem.removeAttribute("checked")), correctly hides the checkmark and enables the persistence of that state.

I have added a note about this workaround to the menuitem entry in the XUL reference <http://developer.mozilla.org/en/docs/XUL:menuitem>.
Assignee: jag → nobody
QA Contact: jrgmorrison → xptoolkit.widgets

Comment 6

7 years ago
> I have added a note about this workaround to the menuitem entry in the XUL
> reference <http://developer.mozilla.org/en/docs/XUL:menuitem>.

https://developer.mozilla.org/en/XUL/menuitem

Comment 7

5 years ago
This works now?  I have a situation where I removed a persisted attribute and it is not present when I start a new session.  The attribute is on a box in my own dialog window and set attributes persist.

Comment 8

3 years ago
(In reply to Ian Nartowicz from comment #7)
> This works now?  I have a situation where I removed a persisted attribute
> and it is not present when I start a new session.

Any update on this?  I am observing the same thing (persisting of no checked attribute), but I don't want to rely on it until I have verification from the devs.
You need to log in before you can comment on or make changes to this bug.