Opened 8 years ago

Closed 8 years ago

#13776 closed defect (fixed)

Heading: remove back button dynamically

Reported by: Adam Peller Owned by: ykami
Priority: high Milestone: 1.7
Component: DojoX Mobile Version: 1.6.1
Keywords: 1.7-mobile Cc: waynevicknair
Blocked By: Blocking:

Description

Another detail that comes from tooling...

In Maqetta, we're wondering if there should be a way to dynamically remove the back button from Heading. Setting the back attr to null (or undefined) doesn't achieve this, but it's not clear that it should, at least as the setter is currently defined. On the other hand, we can't think of any other appropriate API. Attached is a suggestion from @waynevicknair

Attachments (1)

Heading.patch (1.0 KB) - added by Adam Peller 8 years ago.
patch from Wayne Vicknair (IBM, CCLA)

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Adam Peller

Attachment: Heading.patch added

patch from Wayne Vicknair (IBM, CCLA)

comment:1 Changed 8 years ago by ykami

test_screen-size-aware.html has some code that hides the back button like this:

heading.backBtnNode.style.display = "none";

Does this work for you?
If not, I think set("back", "") is not a bad idea because the back button without label text does not make sense.

comment:2 Changed 8 years ago by Adam Peller

adding logic to set the CSS display would require carrying extra code on the user's page to reflect that state, so it would be awkward. The setter patch would be much better, if it works for you. I'm not sure whether "falsey" is good enough or whether it should explicitly use undefined or null... It's probably not important. There doesn't seem to be precedent for removing an attribute in Dijit.

comment:3 Changed 8 years ago by ykami

Keywords: 1.7-mobile added
Milestone: tbd1.7
Priority: lownormal
Status: newassigned
Type: enhancementdefect

comment:4 Changed 8 years ago by ykami

Resolution: fixed
Status: assignedclosed

In [26402]:

Fixes #13776 !strict. set("back", "") should remove the back button itself.

Note: See TracTickets for help on using tickets.